Here you can find the source of getUtcTimestamp()
public static String getUtcTimestamp()
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String getUtcTimestamp() { DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); format.setTimeZone(TimeZone.getTimeZone("GMT")); return format.format(new Date()); }// ww w .j a v a2 s . com }