Here you can find the source of timestampAsIsoString(long timestamp)
public static String timestampAsIsoString(long timestamp)
//package com.java2s; //License from project: Apache License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String timestampAsIsoString(long timestamp) { return dateAsIsoString(new Date(timestamp)); }// ww w. j a v a 2 s. c om public static String dateAsIsoString(Date date) { TimeZone tz = TimeZone.getDefault(); DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); df.setTimeZone(tz); return df.format(date); } }