Here you can find the source of toTimestamp(long value)
public static java.sql.Timestamp toTimestamp(long value)
//package com.java2s; /**/* ww w . ja va 2s . c o m*/ * Project: ${puma-server.aid} * * File Created at 2012-6-11 $Id$ * * Copyright 2010 dianping.com. All rights reserved. * * This software is the confidential and proprietary information of Dianping * Company. ("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 dianping.com. */ public class Main { public static java.sql.Timestamp toTimestamp(long value) { if (value <= 1) { return new java.sql.Timestamp(1000); } return new java.sql.Timestamp(value * 1000L); } }