Here you can find the source of formatMillisTimeGMT(long millis)
public static String formatMillisTimeGMT(long millis)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static DateFormat GMT_FORMAT_MILLIS = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); public static String formatMillisTimeGMT(long millis) { Date d = new Date(millis); synchronized (GMT_FORMAT_MILLIS) { return GMT_FORMAT_MILLIS.format(d); }//from w w w.j a va 2s . c om } }