-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
17, 22
-
None
-
generic
-
generic
"java.time.format.DateTimeParseException" is thrown when parsing "2019-03-12T17:51:40.123UTC+00:00" datetime string with "yyyy-MM-dd'T'HH:mm:ss.SSSzxxx" format. The same is for 'zxxxxx':
java.time.format.DateTimeParseException: Text '2019-03-12T17:51:40.123UTC+00:00' could not be parsed at index 32
at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2108)
at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:2010)
at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:600)
at Reproducer.main(Reproducer.java:18)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at jdk.compiler/com.sun.tools.javac.launcher.Main.execute(Main.java:484)
at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:208)
at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:135)
The reproducer is attached.
The problem seems caused byJDK-8303440 - the exception is not thrown before this change. This seems affect all JDK versions which have JDK-8303440 integrated.
java.time.format.DateTimeParseException: Text '2019-03-12T17:51:40.123UTC+00:00' could not be parsed at index 32
at java.base/java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:2108)
at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:2010)
at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:600)
at Reproducer.main(Reproducer.java:18)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at jdk.compiler/com.sun.tools.javac.launcher.Main.execute(Main.java:484)
at jdk.compiler/com.sun.tools.javac.launcher.Main.run(Main.java:208)
at jdk.compiler/com.sun.tools.javac.launcher.Main.main(Main.java:135)
The reproducer is attached.
The problem seems caused by
- relates to
-
JDK-8303440 The "ZonedDateTime.parse" may not accept the "UTC+XX" zone id
-
- Closed
-