Message-ID: From: "m-van-tilburg (@m-van-tilburg)" To: "pgjdbc/pgjdbc" Date: Fri, 21 Nov 2025 09:58:05 +0000 Subject: Re: [pgjdbc/pgjdbc] issue #3837: ResultSet.getTimestamp() returns incorrect point in time for historical dates In-Reply-To: References: List-Id: X-GitHub-Author-Login: m-van-tilburg X-GitHub-Comment-Id: 3562265852 X-GitHub-Comment-Type: issue_comment X-GitHub-Issue: 3837 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-Type: comment X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3837#issuecomment-3562265852 Content-Type: text/plain; charset=utf-8 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).