Here you can find the source of getDate(ResultSet rs, int colNum)
public static Date getDate(ResultSet rs, int colNum) throws SQLException
//package com.java2s; //License from project: Apache License import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; public class Main { public static final Calendar tzUTC = Calendar.getInstance(TimeZone.getTimeZone("UTC")); public static Date getDate(ResultSet rs, int colNum) throws SQLException { Timestamp ts = rs.getTimestamp(colNum, tzUTC); // column is TIMESTAMPTZ return ts != null ? new Date(ts.getTime()) : null; }// w w w . j ava2 s . c om }