Here you can find the source of getNowTime()
public static String getNowTime()
//package com.java2s; //License from project: Open Source License import java.text.*; public class Main { public static final SimpleDateFormat SDF_FULL = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static String getNowTime() { java.util.Date v_Date = new java.util.Date(System.currentTimeMillis()); return SDF_FULL.format(v_Date); }/*from w ww .j a va 2 s. c o m*/ }