timeZoneDefaultStorage
@ConfigItem(name="default-storage",
defaultValueDocumentation="default")
public Optional<org.hibernate.annotations.TimeZoneStorageType> timeZoneDefaultStorage
How to store timezones in the database by default
for properties of type `OffsetDateTime` and `ZonedDateTime`.
This default may be overridden on a per-property basis using `@TimeZoneStorage`.
NOTE: Properties of type `OffsetTime` are https://hibernate.atlassian.net/browse/HHH-16287[not affected by this
setting].
`default`::
Equivalent to `native` if supported, `normalize-utc` otherwise.
`auto`::
Equivalent to `native` if supported, `column` otherwise.
`native`::
Stores the timestamp and timezone in a column of type `timestamp with time zone`.
+
Only available on some databases/dialects;
if not supported, an exception will be thrown during static initialization.
`column`::
Stores the timezone in a separate column next to the timestamp column.
+
Use `@TimeZoneColumn` on the relevant entity property to customize the timezone column.
`normalize-utc`::
Does not store the timezone, and loses timezone information upon persisting.
+
Instead, normalizes the value to a timestamp in the UTC timezone.
`normalize`::
Does not store the timezone, and loses timezone information upon persisting.
+
Instead, normalizes the value:
* upon persisting to the database, to a timestamp in the JDBC timezone
set through `quarkus.hibernate-orm.jdbc.timezone`,
or the JVM default timezone if not set.
* upon reading back from the database, to the JVM default timezone.
+
Use this to get the legacy behavior of Quarkus 2 / Hibernate ORM 5 or older.