public synchronized Date toDate(Calendar cal, String s) throws SQLException { // 1) Parse backend string Timestamp timestamp = toTimestamp(cal, s); if (timestamp == null) { return null; } // Note: infinite dates are handled in convertToDate // 2) Truncate date part so in given time zone the date would be formatted as 00:00 return convertToDate(timestamp.getTime(), cal == null ? null : cal.getTimeZone()); }
return connection.getTimestampUtils().toTimestamp(cal, string);
public Timestamp getTimestamp(int i, java.util.Calendar cal) throws SQLException { checkClosed(); checkIndex(i, Types.TIMESTAMP, "Timestamp"); if (callResult[i - 1] == null) { return null; } String value = callResult[i - 1].toString(); return connection.getTimestampUtils().toTimestamp(cal, value); }
tmpts = connection.getTimestampUtils().toTimestamp(getDefaultCalendar(), in.toString());
Object v = input.get(index++); oa[length++] = dims > 1 && v != null ? buildArray((PgArrayList) v, 0, -1) : (v == null ? null : connection.getTimestampUtils().toTimestamp(null, (String) v));