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… |