-
Notifications
You must be signed in to change notification settings - Fork 184
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
Special-case Z
, Z[Etc/UTC]
and Z[Etc/GMT]
in IXDTF parser
#5757
Conversation
und
Z
, Z[Etc/UTC]
and Z[Etc/GMT]
in IXDTF parser
@@ -262,21 +298,42 @@ impl<'a> Intermediate<'a> { | |||
self.time.minute, | |||
self.time.second, | |||
)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we now be checking for is_z
and failing with MismatchedTimeZoneFields
in location_only
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so.
if self.is_z { | ||
if let Some(offset) = self.offset { | ||
if offset != UtcOffsetRecord::zero() { | ||
return Err(ParseError::RequiresCalculation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is rejecting Z[-0800]
, right? Seems like RequiresCalculation
isn't quite the right error case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to subtract 8h from the timestamp, which is definitely a calculation. The only non-calculation offset is Z[+0000]
.
Co-authored-by: Shane F. Carr <shane@unicode.org>
These are the only
Z
s that don't require any calculation.