Here you can find the source of toTimestamp(long time)
public static String toTimestamp(long time)
//package com.java2s; //License from project: Apache License public class Main { /**//w w w .ja va2s. c om * PostgreSQL to_timestamp() doesn't support timezone specifications, so this is the only way how to set correct * timestamp with timezone using string (as our current DAOs uses only strings to create SQL). */ public static String toTimestamp(long time) { return String.format("to_timestamp(%d::double precision / 1000)", time); } }