-
Notifications
You must be signed in to change notification settings - Fork 80
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
Regression in 1.5.1, PG date to/from java.sql.Date conversions #199
Comments
On 10/30/18 4:08 PM, pmichalek wrote:
After transition to winter time on night to 28th October 2018 calling TriggerResultSet.getDate(...) returns one day before.
DB: 28-10-2018 -> getDate(...) -> Java: 28-10-2018 (night was one hour longer)
DB: 29-10-2018 -> getDate(...) -> Java: 28-10-2018
DB: 30-10-2018 -> getDate(...) -> Java: 29-10-2018
Fedora 27 (time zone CET)
Java version 1.8.0.192 and 1.8.0.162
Postgresql 11.0 and 10.4 (timezone='Europe/Prague')
Is the same problem seen with getObject(..., java.time.LocalDate.class)?
Do you have an easy way to see if PL/Java 1.5.0 behaved differently
(i.e., is this a behavior change)?
|
getObject(..., java.time.LocalDate.class) seems to be OK!
Unfortunately not. |
On 10/30/18 4:52 PM, pmichalek wrote:
> Is the same problem seen with getObject(..., java.time.LocalDate.class)?
getObject(..., java.time.LocalDate.class) seems to be OK!
> Do you have an easy way to see if PL/Java 1.5.0 behaved differently (i.e., is this a behavior change)?
Unfortunately not.
Unfortunately not easy to check, or not a behavior change?
|
I can reproduce in PG 11 / PL/Java 1.5.1 by setting
Now to see if 1.5.0 did the same thing.... |
Postgresql 9.6.2 with branch trackpg/REL1_5_STABLE/pg96 seems to be OK! |
Rats. That would suggest 1.5.1 broke it then. Could you try the |
Branch bug/REL1_5_STABLE/issue199 is OK |
There will be a 1.5.2 to fix this 1.5.1 regression. However, analysis for this issue uncovered several other, longstanding issues in the legacy Meanwhile, all of these issues underscore the advantages of migrating code to Java 8 or later and the |
Fix a regression in 1.5.1 that was not caught in pre-release testing, and could leave conversions between PostgreSQL date and java.sql.Date off by one day in certain timezones and times of the year (#199). Other issues in date/time conversion have also been uncovered that are of longer standing, not recent regressions. They are detailed in #200 and are not fixed in this PR, but can be addressed in another, later release.
Resolved with release of 1.5.2. |
After transition to winter time on night to 28th October 2018 calling TriggerResultSet.getDate(...) returns one day before.
DB: 28-10-2018 -> getDate(...) -> Java: 28-10-2018 (night was one hour longer)
DB: 29-10-2018 -> getDate(...) -> Java: 28-10-2018
DB: 30-10-2018 -> getDate(...) -> Java: 29-10-2018
Fedora 27 (time zone CET)
Java version 1.8.0.192 and 1.8.0.162
Postgresql 11.0 and 10.4 (timezone='Europe/Prague')
The text was updated successfully, but these errors were encountered: