Here you can find the source of getUTCTime()
public static long getUTCTime()
//package com.java2s; import java.util.Calendar; import java.util.Locale; public class Main { public static long getUTCTime() { Calendar cal = Calendar.getInstance(Locale.CHINA); int zoneOffset = cal.get(java.util.Calendar.ZONE_OFFSET); int dstOffset = cal.get(java.util.Calendar.DST_OFFSET); cal.add(java.util.Calendar.MILLISECOND, -(zoneOffset + dstOffset)); return cal.getTimeInMillis(); }/*from w ww . j av a2 s . co m*/ }