Here you can find the source of formatTimestamp(final Date date)
public static String formatTimestamp(final Date date)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String formatTimestamp(final long t) { return formatTimestamp(new Date(t)); }//from www.j a v a2 s .com public static String formatTimestamp(final Date date) { return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date); } }