Here you can find the source of format(final long unixTimeStamp)
public static String format(final long unixTimeStamp)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String format(final long unixTimeStamp) { final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss z"); sdf.setTimeZone(TimeZone.getTimeZone("UTC")); return sdf.format(new Date(unixTimeStamp * 1000L)); }//from www . j ava 2 s.c o m }