Here you can find the source of getCurrentTimestamp()
public static java.sql.Timestamp getCurrentTimestamp()
//package com.java2s; /*/*from www. j a va 2 s . co m*/ * @(#)Utility.java * * Copyright (c) 2003 DCIVision Ltd * All rights reserved. * * This software is the confidential and proprietary information of DCIVision * Ltd ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the license * agreement you entered into with DCIVision Ltd. */ public class Main { /** * getCurrentTimestamp * * Returns current time in Timestamp object. * * @return Timestamp object which representing the current time. */ public static java.sql.Timestamp getCurrentTimestamp() { java.util.Calendar tmp = java.util.Calendar.getInstance(); tmp.clear(java.util.Calendar.MILLISECOND); return (new java.sql.Timestamp(tmp.getTime().getTime())); } }