pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: m-van-tilburg (@m-van-tilburg) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3837: ResultSet.getTimestamp() returns incorrect point in time for historical dates
Date: Fri, 21 Nov 2025 09:58:05 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

The current `pgjdbc` code is incorrect because instances of `java.util.Calendar` are created (for example with `Calendar.getInstance()` or `new GregorianCalendar()`) without making the calendar pure (proleptic) Gregorian using `java.util.GregorianCalendar#setGregorianChange(java.util.Date)`. The currently created calendar instances are a hybrid of the Julian and Gregorian calendar which is usually not appropriate in a JDBC driver, they should be pure (proleptic) Gregorian instead (to match what is described in https://www.postgresql.org/docs/17/datetime-units-history.html).

view thread (13+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #3837: ResultSet.getTimestamp() returns incorrect point in time for historical dates
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox