Here you can find the source of timestamp()
public static Timestamp timestamp()
//package com.java2s; //License from project: Open Source License import org.joda.time.DateTime; import java.sql.Timestamp; public class Main { public static Timestamp timestamp() { return new Timestamp(DateTime.now().getMillis()); }/*w ww. ja v a2 s. c o m*/ }