Here you can find the source of getToday()
public static Date getToday()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.Date; import java.util.TimeZone; public class Main { public static Date getToday() { Calendar cal = getCalendar(); return cal.getTime(); }/*from ww w . j a v a2s . c o m*/ public static Date getToday(String timezone) { return getCalendar(timezone).getTime(); } public static Calendar getCalendar() { return getCalendar("GMT"); } public static Calendar getCalendar(String timezone) { Calendar cal = Calendar.getInstance(); cal.setTimeZone(TimeZone.getTimeZone(timezone)); return cal; } }