Add date-time module: Instant vs LocalDateTime vs OffsetDateTime vs ZonedDateTime round-tripped across JVM time zones on H2 and PostgreSQL

Hibernate 7.4.14.Final (plus an 8.0.0.Beta4 preview run), H2 2.5.252, PostgreSQL 17.11 in Docker.
Same-JVM and cross-zone round trips, @TimeZoneStorage modes, DST gap/overlap, precision
(precision vs secondPrecision), hibernate.jdbc.time_zone, java_time_use_direct_jdbc default flip.
Supersedes the date/time experiments of docs/13 (7.4.5); chapter 13 is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7rnC7jppGGdHGESvy
This commit is contained in:
2026-10-29 00:56:54 +00:00
committed by Claude
co-authored by Claude Sonnet 5.5
parent c9faf35e61
commit ef2d2aa8ea
149 changed files with 2374 additions and 0 deletions
@@ -0,0 +1,7 @@
# 03-precision
# Hibernate ORM 7.4.14.Final, JDK 25, database PostgreSQL 17.11, JVM default zone America/New_York, java_time_use_direct_jdbc false (default)
# written: 14:00:00.<nanos> local / 08:30:00.<nanos>Z / 14:00:00.<nanos>+05:30 ; read back below (columns are timestamp(6))
nanos .123456789 -> LocalDateTime 2026-06-15T14:00:00.123457 | Instant 2026-06-15T08:30:00.123457Z | OffsetDateTime 2026-06-15T08:30:00.123457Z
nanos .123456500 -> LocalDateTime 2026-06-15T14:00:00.123457 | Instant 2026-06-15T08:30:00.123457Z | OffsetDateTime 2026-06-15T08:30:00.123457Z
nanos .999999999 -> LocalDateTime 2026-06-15T14:00:01 | Instant 2026-06-15T08:30:01Z | OffsetDateTime 2026-06-15T08:30:01Z
nanos .123456499 -> LocalDateTime 2026-06-15T14:00:00.123456 | Instant 2026-06-15T08:30:00.123456Z | OffsetDateTime 2026-06-15T08:30:00.123456Z