Here you can find the source of unixTimestampToDate(long timestamp)
public static String unixTimestampToDate(long timestamp)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static final String DATE_FULL_STR = "yyyy-MM-dd HH:mm:ss"; public static String unixTimestampToDate(long timestamp) { SimpleDateFormat sd = new SimpleDateFormat(DATE_FULL_STR); sd.setTimeZone(TimeZone.getTimeZone("GMT+8")); return sd.format(new Date(timestamp)); }/*from w w w.j a va2 s. c o m*/ }