JDK-8138664 : ZonedDateTime parse error for any date using 'GMT0' ZoneID
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.time
  • Affected Version: 8,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86_64
  • Submitted: 2015-09-30
  • Updated: 2019-05-21
  • Resolved: 2015-11-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b93Fixed
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux 4.1.6-1-ARCH x86_64

A DESCRIPTION OF THE PROBLEM :
Attempting to parse the .toString output of any ZonedDateTime in the 'GMT0' TimeZone results in a DateTimeParseException.


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
ZonedDateTime zdt = ZonedDateTime.now(ZoneId.of("GMT0"));
ZonedDateTime.parse(zdt.toString);
---------- END SOURCE ----------


Comments
Review thread: http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-November/036240.html
09-11-2015

Attached test case was executed on Windows 7 with : JDK 8 -Fail JDK 8u60 -fail JDK 8u66 -Fail JDK 9ea -fail The creation of ZonedDateTime allows using the Zone id of GMT0, but parsing of that ZonedDateTime doesn't allow these. It should be consistent, either disallowed for both creation and parsing , or allowed for both. Moving across to dev-team for their evaluation.
12-10-2015