Here you can find the source of getTimeNumberToday()
public static long getTimeNumberToday()
//package com.java2s; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyy-MM-dd"); public static long getTimeNumberToday() { Date date = new Date(); String str = yyyyMMdd.format(date); try {/*from ww w . java 2 s .c o m*/ date = yyyyMMdd.parse(str); return date.getTime() / 1000L; } catch (ParseException e) { e.printStackTrace(); } return 0L; } }