Here you can find the source of ConvertLongToTimeString(long lastModified)
public static String ConvertLongToTimeString(long lastModified)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; public class Main { public static String ConvertLongToTimeString(long lastModified) { return toISO2616DateFormat(new Date(lastModified)); }/*from w w w. ja v a 2 s .co m*/ public static String toISO2616DateFormat(Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US); dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); return dateFormat.format(date); } }