Here you can find the source of getTimeStr(long time)
public static String getTimeStr(long time)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { private final static SimpleDateFormat dateFormater = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss", Locale.CHINA); public static String getTimeStr(long time) { return dateFormater.format(new Date(time)); }//from w w w . ja v a 2 s. c o m }