From 5a2d5cc093f7273f30845bdc64fd6a95f7bb8c06 Mon Sep 17 00:00:00 2001 From: Peter Palaga Date: Tue, 19 Mar 2024 14:13:19 +0100 Subject: [PATCH] RestEasy Jackson test fails in certain time zones, fix #39507 --- .../io/quarkus/it/resteasy/jackson/GreetingResourceTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/integration-tests/resteasy-jackson/src/test/java/io/quarkus/it/resteasy/jackson/GreetingResourceTest.java b/integration-tests/resteasy-jackson/src/test/java/io/quarkus/it/resteasy/jackson/GreetingResourceTest.java index a23637ffc4b63..1a9b21d04b772 100644 --- a/integration-tests/resteasy-jackson/src/test/java/io/quarkus/it/resteasy/jackson/GreetingResourceTest.java +++ b/integration-tests/resteasy-jackson/src/test/java/io/quarkus/it/resteasy/jackson/GreetingResourceTest.java @@ -6,7 +6,6 @@ import java.sql.Date; import java.time.LocalDate; -import java.time.ZoneOffset; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; @@ -24,7 +23,7 @@ class GreetingResourceTest { void testEndpoint() throws DatatypeConfigurationException { final LocalDate localDate = LocalDate.of(2019, 01, 01); - final Date sqlDate = new Date(localDate.atStartOfDay(ZoneOffset.UTC).toInstant().toEpochMilli()); + final Date sqlDate = new Date(119, 0, 1); final XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance() .newXMLGregorianCalendar("2019-01-01T00:00:00.000+00:00"); final Greeting greeting = new Greeting("hello", localDate, sqlDate, xmlGregorianCalendar);