Here you can find the source of getStartOfToday()
public static long getStartOfToday()
//package com.java2s; //License from project: Open Source License import java.util.Calendar; import java.util.TimeZone; public class Main { public static long getStartOfToday() { Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("America/Los_Angeles")); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); return cal.getTime().getTime(); }// ww w .j a v a2s . c o m }