-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normative: Allow ISO strings with "Z" + a bracketed IANA name
Previously we had decided to always throw on these strings. Based on feedback from the IETF SEDATE working group, we are going to allow them. This means changes to what kinds of strings are allowed in several contexts. See #1695 for more information. The following diagram may be helpful when reading this commit. "datetime" = e.g. "2021-08-19T17:30" "offset" = e.g. "-07:00" "bracket" = e.g. "[America/Vancouver]", "[-07:00]" or "[UTC]" TimeZone.from: - datetime + Z -> UTC - datetime + offset -> offset time zone - datetime + bracket -> IANA time zone - datetime + Z + bracket -> " - datetime + offset + bracket -> " - throws on a bare datetime string ZonedDateTime.from: - datetime + bracket -> preserve wall time in the IANA time zone - datetime + Z + bracket -> preserve exact time in the IANA time zone - datetime + offset + bracket -> consult offset option if ambiguous - throws on a string with no bracket Instant.from: - datetime + Z -> preserve exact time - datetime + offset -> " - datetime + Z + bracket -> preserve exact time, ignore bracket - datetime + offset + bracket -> " - throws on a bare datetime string, or datetime + bracket relativeTo: - datetime + bracket -> do what ZonedDateTime.from does - datetime + Z + bracket -> " - datetime + offset + bracket -> " - anything else -> do what PlainDateTime.from does Closes: #1695 Closes: #1696
- Loading branch information
Showing
4 changed files
with
60 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters