Here you can find the source of getCurrentTimestamp()
Timestamp
object, using milliseconds since January 1, 1970, 00:00:00 GMT.
Timestamp
object using milliseconds since January 1, 1970, 00:00:00 GMT
public static java.sql.Timestamp getCurrentTimestamp()
//package com.java2s; /*//w w w.j a va 2 s . com * Copyright (c) Red de Pruebas C.A. All rights reserved. * RED DE PRUEBAS C.A. PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ import java.util.Calendar; public class Main { /** * Returns a <code>Timestamp</code> object, using milliseconds since January * 1, 1970, 00:00:00 GMT. * <p> * From a <code>Calendar</code> object based on the current time in the * default time zone with the default locale, gets a <code>Date</code> * object representing this <code>Calendar</code>'s time value (millisecond * offset from the <a href="#Epoch">Epoch</a>"). * <p> * Then gets the number of milliseconds since January 1, 1970, 00:00:00 GMT * represented by this <tt>Date</tt> object and finally constructs a * <code>Timestamp</code> object using milliseconds time value. * * @return a <code>Timestamp</code> object using milliseconds since January * 1, 1970, 00:00:00 GMT * @see java.util.Calendar#getInstance() * @see java.util.Calendar#getTime() * @see java.util.Date#getTime() * @see java.sql.Timestamp#Timestamp(long) * @since 0.1 */ public static java.sql.Timestamp getCurrentTimestamp() { return new java.sql.Timestamp(Calendar.getInstance().getTime().getTime()); } }