Here you can find the source of adjustedMillis(Calendar cal)
private static long adjustedMillis(Calendar cal)
//package com.java2s; import java.util.Calendar; public class Main { /**/* w ww . j a v a 2 s . c o m*/ * Gets the time in milliseconds from a Calendar, adjusting for timezone * so that day subtraction works properly. */ private static long adjustedMillis(Calendar cal) { return cal.getTimeInMillis() + cal.getTimeZone().getOffset(cal.getTimeInMillis()); } }