Here you can find the source of getCurrentTime()
public static Timestamp getCurrentTime()
//package com.java2s; import java.sql.Timestamp; import java.util.Calendar; import java.util.Locale; public class Main { public static Timestamp getCurrentTime() { long time = Calendar.getInstance(Locale.CANADA).getTime().getTime(); return new Timestamp(time); }//w ww .ja v a 2s . c o m }