Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.TimeZone; public class Main { /** * * @return */ public static long getMillisGMT() { Calendar calendar = new GregorianCalendar(); TimeZone mTimeZone = calendar.getTimeZone(); int offset = mTimeZone.getRawOffset(); return System.currentTimeMillis() - offset; } }