Here you can find the source of getNow()
public static String getNow()
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; public class Main { public static String getNow() { return getISOFormat(new java.util.Date()); }/*from w w w . j av a2 s. c o m*/ public static String getISOFormat(java.util.Date date) { return new SimpleDateFormat("yyyy-mm-dd hh:mm:ss").format(date); } }