Here you can find the source of resetHourMillisToZero(long millis)
public static long resetHourMillisToZero(long millis)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static long resetHourMillisToZero(long millis) { Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(millis); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); return calendar.getTimeInMillis(); }//from w w w .jav a 2s. com }