-
Notifications
You must be signed in to change notification settings - Fork 185
Closed
Labels
type: bugA general bugA general bug
Milestone
Description
Bug Report
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.
Steps to reproduce
As part of AbstractCodecIntegrationTests
testCodec(Instant.class, Instant.parse("0000-12-31T01:01:00Z"), "TIMESTAMPTZ");
Expected behavior/code
Dates BC should also be inserted by the driver.
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug