Here you can find the source of getTimeStamp()
public static String getTimeStamp()
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.util.Date; public class Main { public static String getTimeStamp() { return String.valueOf(new Date().getTime()).substring(0, 10); }//from w ww .ja v a 2 s.c o m public static String getTime() { return DateFormat.getDateTimeInstance().format(new Date()); } }