Here you can find the source of nowTimestamp()
public static java.sql.Timestamp nowTimestamp()
//package com.java2s; //License from project: Apache License import java.sql.Timestamp; public class Main { /**// www . j a v a2 s . c om * Return a Timestamp for right now * * @return Timestamp for right now */ public static java.sql.Timestamp nowTimestamp() { return getTimestamp(System.currentTimeMillis()); } /** * Convert a millisecond value to a Timestamp. * @param time millsecond value * @return Timestamp */ public static java.sql.Timestamp getTimestamp(long time) { return new java.sql.Timestamp(time); } /** * Convert a millisecond value to a Timestamp. * @param milliSecs millsecond value * @return Timestamp */ public static Timestamp getTimestamp(String milliSecs) throws NumberFormatException { return new Timestamp(Long.parseLong(milliSecs)); } }