-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8364752: Class java.time.Instant cannot parse all ISO 8601 date formats #26708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back naoto! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
How about using different patterns for parsing and printing instead? |
Shall we accompany the changes with a set of tests that verifies |
In fact, the current The following change:
will parse hour-only offset for |
I don't think |
Instant.parse()
is expected to use the offset zone pattern+HH:mm:ss
(as defined byDateTimeFormatterBuilder.appendOffsetId()
), but it fails to parse hour-only offsets such as+02
. This is because the actual implementation uses+HH:MM:ss
as the pattern. While replacing the pattern in the implementation as with the specification would allow hour-only offsets, it would also introduce compatibility issues, i.e., printing would omit the minutes field when it is zero. So, it is preferable to update the specification to match the implementation. A CSR has also been drafted for this change.Progress
Issues
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26708/head:pull/26708
$ git checkout pull/26708
Update a local copy of the PR:
$ git checkout pull/26708
$ git pull https://git.openjdk.org/jdk.git pull/26708/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26708
View PR using the GUI difftool:
$ git pr show -t 26708
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26708.diff
Using Webrev
Link to Webrev Comment