Skip to content

Commit

Permalink
Fixed JDK 1.8 problem. OffsetDateTime.parse() does not handle proper …
Browse files Browse the repository at this point in the history
…ISO 8601 Date Time offset Strings that include timezone offset values: "2024-02-12T11:38:00+01:00". That fails to parse in JDK 1.8, but works in 11+
  • Loading branch information
jdereg committed Feb 13, 2024
1 parent c6fc19a commit f8650e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ public TimeZone getTimeZone() {
{ new Timestamp(Long.MAX_VALUE), Long.MAX_VALUE },
});
TEST_DB.put(pair(Instant.class, Long.class), new Object[][] {
{ Instant.parse("2024-02-12T11:38:00+01:00"), 1707734280000L },
{ ZonedDateTime.parse("2024-02-12T11:38:00+01:00").toInstant(), 1707734280000L },
});
TEST_DB.put(pair(LocalDate.class, Long.class), new Object[][] {
{ (Supplier<LocalDate>) () -> {
Expand Down Expand Up @@ -1041,7 +1041,7 @@ public TimeZone getTimeZone() {
{ (char) 0, 0d },
});
TEST_DB.put(pair(Instant.class, Double.class), new Object[][] {
{ Instant.parse("2024-02-12T11:38:00+01:00"), 1707734280000d },
{ ZonedDateTime.parse("2024-02-12T11:38:00+01:00").toInstant(), 1707734280000d },
});
TEST_DB.put(pair(LocalDate.class, Double.class), new Object[][] {
{ (Supplier<LocalDate>) () -> {
Expand Down

0 comments on commit f8650e3

Please sign in to comment.