Here you can find the source of getDateTimeBySecond(long timeMillis)
public static String getDateTimeBySecond(long timeMillis)
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; public class Main { public static String getDateTimeBySecond(long timeMillis) { Timestamp timestamp = new Timestamp(timeMillis); return timestamp.toString(); }// w ww . java2 s . co m }