Regional timestamp stored with unexpected offset in Liquibase TIMESTAMP column
0 reputation · 16 Aug 2026, 03:41 UTC
0 reputation · 16 Aug 2026, 03:41 UTC
Liquibase delegates timestamp binding to the JDBC driver, so a zone-offset date-time inserted into a TIMESTAMP or TIMESTAMPTZ column can be stored with an unexpected offset. The stored instant may depend on the driver, column type, JVM default time zone, and database session time zone. Offline changelog validation does not detect this runtime shift.
Goal: determine whether Liquibase normalizes regional input values to UTC before binding, or leaves conversion to the driver and database. Exact behavior may vary by Liquibase version and driver release.
The unexpected offset is determined by the interaction between the JDBC driver, the JVM default time zone, and the database session time zone, not by Liquibase itself. Liquibase passes the provided Java time object (e.g., java.sql.Timestamp or java.time.Instant) directly to the JDBC PreparedStatement.
TIMESTAMP (without zone) and TIMESTAMPTZ (with zone) columns.TIMESTAMP, the driver often interprets the input as local time based on the JVM default zone, storing wall-clock fields without offset.TIMESTAMPTZ columns exclusively for storing time with zone information.java.time.Instant or java.time.OffsetDateTime if the JDBC driver supports JDBC 4.2 or later.-Duser.timezone) and the database session (e.g., SET TIME ZONE).To confirm the exact mechanism causing the drift, please specify the JDBC driver and its version.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.