Skip to content

Commit b2889e4

Browse files
committed
Due to a change in JDK 22, the Locale.ROOT shall not be used anymore for parsing PostgreSQL timestamp, insted US locale should be used.
1 parent 2de7f0d commit b2889e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vertx-pg-client/src/main/java/io/vertx/pgclient/impl/codec/DataTypeCodec.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ private static OffsetTime textDecodeTIMETZ(int index, int len, ByteBuf buff) {
10751075
public static final LocalDateTime LDT_PLUS_INFINITY = LOCAL_DATE_TIME_EPOCH.plus(Long.MAX_VALUE, ChronoUnit.MICROS);
10761076
// 4714-11-24 00:00:00 BC
10771077
public static final LocalDateTime LDT_MINUS_INFINITY = LocalDateTime.parse("4714-11-24 00:00:00 BC",
1078-
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss G", Locale.ROOT));
1078+
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss G", Locale.US));
10791079

10801080
private static void binaryEncodeTIMESTAMP(LocalDateTime value, ByteBuf buff) {
10811081
if (value.compareTo(LDT_PLUS_INFINITY) >= 0) {

0 commit comments

Comments
 (0)