Files
hibernate-demo/date-time/output/04-zoned-failure-postgres-America_New_York-directtrue-h7.txt
T
asmhatreandClaude Sonnet 5.5 ef2d2aa8ea 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
2026-10-29 00:56:54 +00:00

10 lines
991 B
Plaintext

# 04-zoned-failure
# Hibernate ORM 7.4.14.Final, JDK 25, database PostgreSQL 17.11, JVM default zone America/New_York, java_time_use_direct_jdbc true (set)
# ZonedDateTime on PostgreSQL with java_time_use_direct_jdbc=true
## persist(new ZonedEvent(zonedDefault = 2026-06-15T10:30+02:00[Europe/Paris]))
org.hibernate.exception.SQLGrammarException: Unable to bind parameter #3 - 2026-06-15T10:30+02:00[Europe/Paris] [Cannot cast an instance of java.time.ZonedDateTime to type Types.TIMESTAMP_WITH_TIMEZONE] [n/a]
org.postgresql.util.PSQLException: Cannot cast an instance of java.time.ZonedDateTime to type Types.TIMESTAMP_WITH_TIMEZONE
## find(ZonedEvent.class, 2) -- a row whose ZonedDateTime columns are NULL
org.hibernate.exception.DataException: Could not extract column [4] from JDBC ResultSet [conversion to class java.time.ZonedDateTime from timestamptz not supported] [n/a]
org.postgresql.util.PSQLException: conversion to class java.time.ZonedDateTime from timestamptz not supported