Here you can find the source of formatUtcTime(long tval)
public static String formatUtcTime(long tval)
//package com.java2s; // The MIT License import java.text.SimpleDateFormat; import java.util.SimpleTimeZone; public class Main { public static String formatUtcTime(long tval) { SimpleDateFormat utcSdf = new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss"); utcSdf.setTimeZone(new SimpleTimeZone(0, "UTC")); String stg = utcSdf.format(tval); return stg; }// w w w . ja v a 2s .c o m }