Here you can find the source of GetTimeInMilliseconds(Date date)
private static long GetTimeInMilliseconds(Date date)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.util.*; public class Main { private static long GetTimeInMilliseconds(Date date) { Calendar cal = Calendar.getInstance(); cal.setTime(date);/*from w w w . j av a2 s . c om*/ return cal.getTimeInMillis() + cal.getTimeZone().getOffset(cal.getTimeInMillis()); } }