Here you can find the source of getCurrentTimeStamp()
public static Timestamp getCurrentTimeStamp() throws Exception
//package com.java2s; import java.sql.Timestamp; import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static Timestamp getCurrentTimeStamp() throws Exception { try {/*from ww w. j a v a2s . c o m*/ Calendar cal = new GregorianCalendar(); Timestamp result = new Timestamp(cal.getTime().getTime()); return result; } catch (Exception e) { throw new Exception("[DateUtil][getCurrentTimeStamp]" + e.getMessage(), e); } } }