Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.TimeZone; public class Main { public static long getUTCTime() { Calendar cal = Calendar.getInstance(); cal.setTimeZone(TimeZone.getTimeZone("gmt")); return cal.getTimeInMillis(); } }