Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String getCurrentUTCTime() { SimpleDateFormat df1 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); Date t = new Date(); df1.setTimeZone(TimeZone.getTimeZone("UTC")); return df1.format(t); } }