Here you can find the source of getTimeFromCurrent(long l)
public static String getTimeFromCurrent(long l)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getTimeFromCurrent(long l) { if (l == 0) return ""; return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(l)); }//from w w w . ja va 2 s . c o m }