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:
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.ankurm</groupId>
|
||||
<artifactId>date-time</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<name>date-time</name>
|
||||
<description>Hibernate 7 date/time mapping: Instant vs LocalDateTime vs OffsetDateTime vs ZonedDateTime, round-tripped across JVM time zones on H2 and PostgreSQL (plain Hibernate, no Spring)</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.release>25</maven.compiler.release>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<!-- Override to run the same tests on the Hibernate 8 beta:
|
||||
-Dhibernate.version=8.0.0.Beta4 -Dpersistence.version=4.0.0-M7 -Dh.label=h8 -->
|
||||
<hibernate.version>7.4.14.Final</hibernate.version>
|
||||
<persistence.version>3.2.0</persistence.version>
|
||||
<h.label>h7</h.label>
|
||||
<dt.jvmargs>-Duser.timezone=UTC</dt.jvmargs>
|
||||
<dt.db>h2</dt.db>
|
||||
<dt.phase>both</dt.phase>
|
||||
<dt.pg.url>none</dt.pg.url>
|
||||
<dt.directJdbc>default</dt.directJdbc>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.orm</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jakarta.persistence</groupId>
|
||||
<artifactId>jakarta.persistence-api</artifactId>
|
||||
<version>${persistence.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>2.5.252</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>42.7.14</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>2.7.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-nop</artifactId>
|
||||
<version>2.0.17</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>6.0.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>3.27.7</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.6.0</version>
|
||||
<configuration>
|
||||
<!-- JVM time zone is the variable under test, so it is passed through dt.jvmargs -->
|
||||
<argLine>-Xmx512m ${dt.jvmargs}</argLine>
|
||||
<systemPropertyVariables>
|
||||
<h.label>${h.label}</h.label>
|
||||
<h.version>${hibernate.version}</h.version>
|
||||
<dt.db>${dt.db}</dt.db>
|
||||
<dt.phase>${dt.phase}</dt.phase>
|
||||
<dt.pg.url>${dt.pg.url}</dt.pg.url>
|
||||
<dt.directJdbc>${dt.directJdbc}</dt.directJdbc>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
Reference in New Issue
Block a user