Here you can find the source of getTimeStr(long t)
public static String getTimeStr(long t)
//package com.java2s; //License from project: Open Source License import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String getTimeStr(long t) { SimpleDateFormat dt = new SimpleDateFormat("z_yyyy.MM.dd_hh.mm.ss"); dt.setTimeZone(TimeZone.getTimeZone("PST")); String dateStr = dt.format(new Date(t)); return dateStr; }/*from w w w . j a v a 2 s . co m*/ }