Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMzQxMDUzZDg4...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16289?atlOrigin=eyJpIjoiMzQxMD...
) HHH-16289 (
https://hibernate.atlassian.net/browse/HHH-16289?atlOrigin=eyJpIjoiMzQxMD...
) TimeStorageType.NATIVE/COLUMN for ZonedDateTime only preserves the offset, not the
timezone (
https://hibernate.atlassian.net/browse/HHH-16289?atlOrigin=eyJpIjoiMzQxMD...
)
Issue Type: Bug Assignee: Unassigned Created: 13/Mar/2023 09:51 AM Priority: Major
Reporter: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
On H2 at least (didn’t test other DBs), when using hibernate.timezone.default_storage =
NATIVE or COLUMN , if you persist a ZonedDateTime with a non-offset ZoneId (e.g.
ZoneId.of("Africa/Cairo") , upon reloading from the database the ZonedDateTime
will actually use an offset (e.g. ZoneOffset.ofHours(3) ), which is different and involves
a loss of information.
For NATIVE this may be a limitation of the databases and the timestamp with timezone SQL
type, in which case that’s an acceptable limitation.
For COLUMN though, Hibernate ORM itself decides what it stores in the column, so that’s
more questionable…
(
https://hibernate.atlassian.net/browse/HHH-16289#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16289#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100217- sha1:2199b34 )