[Hibernate ORM & Hibernate reactive] Where is this UTC to GMT conversion failing? #30662
Unanswered
agreedSkiing
asked this question in
Q&A
Replies: 3 comments
-
/cc @DavideD (hibernate-reactive), @Sanne (hibernate-reactive), @gavinking (hibernate-reactive) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Not editing my question but i have mentioned these conversion issue before in my P.S edit on #29956 (comment) and #10768 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
-
So i narrowed it down to being hibernate only so oging to ask the question on that forum instead. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I don't know if this is an issue with quarkus or if it is based on Hibernate Orm 5 that is used in both Hibernate reactive and Hibernate Orm, OR if it is a separate issue with the driver for postgres in vertex for Hibernate Reactive and the JDBC in Hibernate Orm. Which makes me unsure where to report this 😐.
So what is happening? Nah reproducer projects
First of all reproducer projects that have been linked before but have now been updated as a fix for issue #29956 has been deployed.
Hibernate reactive: https://github.com/agreedSkiing/test-hibernate-reactive-timezone-postgres
Hibernate Orm: https://github.com/agreedSkiing/test-hibernate-timezone-postgres
Everything is on the master branches (since I removed Flyway completely to keep them "pure hibernate")
Now for the explenation and questions I hope...
[Hibernate Reactive and Hibernate Orm]: What is causing the weird time conversion issue from postgres db UTC time to application GMT+1 time? All my tests starting with the Gmt prefix fail in Hibernate Reactive project and GmtPodUtcDbTest.java in my Hibernate Orm project which leads on to question 2.
[Hibernate Orm]: Why does
@QuarkusTest
react so differently when launching the tests withmvn clean package -Duser.timezone=Etc/GMT-1
and then having a test annotated with a QuarkusTestResourceLifecycleManager which sets theuser.timezone
toEtc/GMT-1
? Since my knowledge is limited about Quarkus and its annotations I assumed that TestResource does the same thing as specifying the -D flag when launching a maven process and that a TestResource replaces or adds the value to the test execution and with that knowledge in mind I thought that GmtPodUtcDbTest.java and TImeTest.java should produce the same result with the previous statement and my knowledge about time conversion from UTC to GMT+1 so what I happening there? The quote below is when I discovered this weird behaviour (weird in my opnion).This also fails the GmtIT,java tests if
%test.quarkus.hibernate-orm.jdbc.timezone=UTC
is changed toquarkus.hibernate-orm.jdbc.timezone=UTC
in the Hibernate Orm project..Beta Was this translation helpful? Give feedback.
All reactions