Here you can find the source of getTodayCalendar()
public static Calendar getTodayCalendar()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.TimeZone; public class Main { private final static TimeZone timeZone = TimeZone.getTimeZone("UTC"); /**/* ww w . j av a 2 s.com*/ * Returns a Java calendar rounded to the current day * @return the calendar */ public static Calendar getTodayCalendar() { Calendar calendar = Calendar.getInstance(timeZone); calendar.setTimeZone(timeZone); calendar.set(Calendar.HOUR, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar; } }