Here you can find the source of getToday()
public static Date getToday()
//package com.java2s; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; public class Main { private static final TimeZone timeZone = TimeZone.getTimeZone("GMT+8"); public static Date getToday() { Calendar c = Calendar.getInstance(); c.setTimeZone(timeZone);/*from w ww. j a va 2 s . c o m*/ c.set(c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DAY_OF_MONTH), 0, 0, 0); return c.getTime(); } }