Here you can find the source of timeToStr(int time)
public static String timeToStr(int time)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final String STAND_DATE_TIME = "yyyy-MM-dd HH:mm:ss"; public static String timeToStr(int time) { return new SimpleDateFormat(STAND_DATE_TIME).format(new Date(time * 1000L)); }/*from w w w. jav a 2 s . co m*/ }