Here you can find the source of getNowTime()
public static String getNowTime()
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getNowTime() { Date date = new Date(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd kk:mm:ss"); String time = simpleDateFormat.format(date); return time; }/* w w w .j av a2 s .c om*/ }