Consider hibernate.timezone.default_storage for OffsetTime typing and storage
Description
Activity
Show:
Fixed
Assignee
Reporter
Yoann Rodière
Yoann RodièreComponents
Fix versions
Priority
Created March 13, 2023 at 4:43 PM
Updated September 10, 2024 at 4:54 AM
Resolved March 23, 2023 at 11:00 AM
As documented (and implemented),
hibernate.timezone.default_storage
affectsZonedDateTime
andOffsetDateTime
, but notOffsetTime
.As a result, if you set
hibernate.timezone.default_storage=NORMALIZE_UTC
orhibernate.timezone.default_storage=COLUMN
orhibernate.timezone.default_storage=NATIVE
, it won’t affectOffsetTime
properties, which will still be mapped to a column of typeTIME
(notTIME WITH TIMEZONE
), and will still be normalized tohibernate.jdbc.time_zone
or the JVM timezone (not UTC).That’s at least surprising, and I think getting
OffsetTime
in line withZonedDateTime
andOffsetDateTime
would improve the situation.