-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading Postgresql pre-gregorian dates as LocalDates results in mismatching values #3363
Comments
I think this issue was reported before and the solution is to have your app and your db in the same timezone. Otherwise please provide a solution. |
This is not about timezones. There will be a difference of 6 days if we use those old dates. |
The issue was with LocalDate shifting to one 1 day #2096 and it was fixed here #3248 |
@erkieh Please provide an example project with Micronaut Data that is failing and an alternative in raw JDBC with a date conversions that don't have this error. |
Expected Behavior
Dates before 15 October 1582 are converted to LocalDates preserving the value
Actual Behaviour
Dates before 15 October 1582 are read back with a difference of +6 days.
Conversion seems to happen on
micronaut-data/data-runtime/src/main/java/io/micronaut/data/runtime/convert/DataConversionServiceFactory.java
Line 668 in 59e5d4c
Date and Instant epoch millis are handled differently before the Julian to Gregorian Calendar switch on 15th October 1582
Steps To Reproduce
No response
Environment Information
No response
Example Application
No response
Version
4.12
The text was updated successfully, but these errors were encountered: