Here you can find the source of getNowTime()
public static String getNowTime()
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.util.Date; public class Main { public static String getNowTime() { Date now = new Date(); return DateFormat.getDateTimeInstance().format(now); }// www . j a v a 2 s .c o m }