Here you can find the source of GetUtcNow()
public static String GetUtcNow()
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String GetUtcNow() { return FormatAsUtc(new Date()); }/* w w w . j av a2 s. c om*/ public static String FormatAsUtc(Date date) { SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); f.setTimeZone(TimeZone.getTimeZone("UTC")); return f.format(date); } }