|
29 | 29 | import static org.hibernate.cfg.AvailableSettings.TIMEZONE_DEFAULT_STORAGE; |
30 | 30 | import static org.hibernate.reactive.containers.DatabaseConfiguration.DBType.DB2; |
31 | 31 | import static org.hibernate.reactive.testing.ReactiveAssertions.assertWithTruncationThat; |
32 | | -import static org.hibernate.type.descriptor.DateTimeUtils.roundToDefaultPrecision; |
| 32 | +import static org.hibernate.type.descriptor.DateTimeUtils.adjustToDefaultPrecision; |
33 | 33 |
|
34 | 34 | @Timeout(value = 10, timeUnit = MINUTES) |
35 | 35 | @DisabledFor(value = DB2, reason = "Exception: IllegalStateException: Needed to have 6 in buffer but only had 0") |
@@ -60,10 +60,10 @@ public void test(VertxTestContext context) { |
60 | 60 | .thenCompose( zid -> openSession() |
61 | 61 | .thenCompose( s -> s.find( Zoned.class, zid ) |
62 | 62 | .thenAccept( z -> { |
63 | | - assertWithTruncationThat( roundToDefaultPrecision( z.zonedDateTime.toInstant(), getDialect() ) ) |
64 | | - .isEqualTo( roundToDefaultPrecision( nowZoned.toInstant(), getDialect() ) ); |
65 | | - assertWithTruncationThat( roundToDefaultPrecision( z.offsetDateTime.toInstant(), getDialect() ) ) |
66 | | - .isEqualTo( roundToDefaultPrecision( nowOffset.toInstant(), getDialect() ) ); |
| 63 | + assertWithTruncationThat( adjustToDefaultPrecision( z.zonedDateTime.toInstant(), getDialect() ) ) |
| 64 | + .isEqualTo( adjustToDefaultPrecision( nowZoned.toInstant(), getDialect() ) ); |
| 65 | + assertWithTruncationThat( adjustToDefaultPrecision( z.offsetDateTime.toInstant(), getDialect() ) ) |
| 66 | + .isEqualTo( adjustToDefaultPrecision( nowOffset.toInstant(), getDialect() ) ); |
67 | 67 | assertThat( z.offsetDateTime.getOffset() ).isEqualTo( ZoneId.of( "Z" ) ); |
68 | 68 | assertThat( z.zonedDateTime.getZone() ).isEqualTo( ZoneOffset.ofHours( 0 ) ); |
69 | 69 | } ) |
|
0 commit comments