You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When storing a date that is BC (Before Christ) an error is thrown.
Versions
Driver: 0.9.3.RELEASE
Database: 12.11 / 13.3
Java: 17
OS: MacOS / Ubuntu
Current Behavior
A date that is BC (e.g. Year 0) will throw an error e.g. [22008] date/time field value out of range: "0000-12-31T01:01:00Z"
The driver is using Instant::toString for conversion, but this ignores the ERA (BC) and the database does not accept this as a value.
PostgreSQL can properly store these dates, but the driver implementation now prevents users from inserting it.
Looking into our temporal support, the way we handle overflow values and extremes aren't ideal. all of this requires a bit of revision to align with the awesome work done in the JDBC Postgres driver.
mp911de
changed the title
Error when storing an instant BC (e.g. "0000-12-31T01:01:00Z")
Error when storing BC dates (e.g. "0000-12-31T01:01:00Z")
Feb 16, 2023
We now revised text-encoded temporal value parsing to accomodate for proper timezone and ERA indicators. Also, we now translate infinity and -infinity values into the corresponding MAX (e.g. LocalDateTime.MAX) and MIN values.
[resolves#578]
Signed-off-by: Mark Paluch <[email protected]>
Bug Report
When storing a date that is BC (Before Christ) an error is thrown.
Versions
Current Behavior
A date that is BC (e.g. Year 0) will throw an error e.g. [22008] date/time field value out of range: "0000-12-31T01:01:00Z"
The driver is using
Instant::toString
for conversion, but this ignores the ERA (BC
) and the database does not accept this as a value.PostgreSQL can properly store these dates, but the driver implementation now prevents users from inserting it.
Steps to reproduce
As part of
AbstractCodecIntegrationTests
Expected behavior/code
Dates BC should also be inserted by the driver.
The text was updated successfully, but these errors were encountered: