pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: m-van-tilburg (@m-van-tilburg) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: Re: [pgjdbc/pgjdbc] issue #3930: Revert semantic calendar changes introduced with #3837
Date: Mon, 09 Feb 2026 15:43:31 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
> This ship has sailed when `java.sql.Date` and `java.sql.Timestamp` has been bound into JDBC and packed with too much magic (throwing no shade on the original authors, time is extremely difficult, and even the new Java time API is not perfect, I sincerely think that it's an unsolvable problem). The "proper" scenario would be a new JDBC API which uses `java.time.OffsetDateTime` as default, but that will never happen.
>
> I think there is no proper solution here on the JDBC-driver level. Clients, who care about semantical correctness, must correct the data _after_ querying it from the `ResultSet`.
>
> Note that if the decision is made for a backroll, it would be nice to notify the MSSQL JDBC team, they currently have an open issue for introducing the same change [microsoft/mssql-jdbc#2789](https://github.com/microsoft/mssql-jdbc/issues/2789) but it's not merged yet.
I am not sure if you are aware but support for `java.time` classes (using `preparedStatement.setObject()` and `resultSet.getObject()`) was added in [JDBC 4.2](https://download.oracle.com/otndocs/jcp/jdbc-4_2-mrel2-spec/index.html) (Java 8)
As a side note, I tested the legacy date/time classes behavior with three JDBC drivers, "pgjdbc", "mssql-jdbc" and "ojdbc" (Oracle). The Oracle JDBC driver does use the proleptic Gregorian calendar in all cases. For our software (that supports all three databases mentioned above) we configured Hibernate to always use the `java.time` classes for JDBC. This makes things simple because everything is always proleptic Gregorian and the legacy date/time classes can be circumvented all together.
view thread (24+ 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 #3930: Revert semantic calendar changes introduced with #3837
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