Skip to content
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

Normative: Limit time zone offset precision to minutes #3087

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gibson042
Copy link
Contributor

@gibson042 gibson042 commented Jun 1, 2023

This aligns with
https://www.ietf.org/archive/id/draft-ietf-sedate-datetime-extended-08.html#section-4 , which allows expression of UTC offsets per RFC 3339 time-numoffset: https://www.rfc-editor.org/rfc/rfc3339#section-5.6

time-minute     = 2DIGIT  ; 00-59
…
time-numoffset  = ("+" / "-") time-hour ":" time-minute

Prompted by discussion in TG2 about tc39/ecma402#788 .

This aligns with
https://www.ietf.org/archive/id/draft-ietf-sedate-datetime-extended-08.html#section-4 ,
which allows expression of UTC offsets per RFC 3339 `time-numoffset`.
https://www.rfc-editor.org/rfc/rfc3339#section-5.6
> time-minute     = 2DIGIT  ; 00-59
> …
> time-numoffset  = ("+" / "-") time-hour ":" time-minute
@michaelficarra michaelficarra added the needs consensus This needs committee consensus before it can be eligible to be merged. label Aug 30, 2023
Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine since it is a strict improvement over what we have currently, but I don't know what "and id is valid as the first argument to GetNamedTimeZoneEpochNanoseconds and GetNamedTimeZoneOffsetNanoseconds" means since those operations do not have any assertions or return completion records, which is all I could imagine this would mean.

@gibson042
Copy link
Contributor Author

gibson042 commented Aug 30, 2023

I don't know what "and id is valid as the first argument to GetNamedTimeZoneEpochNanoseconds and GetNamedTimeZoneOffsetNanoseconds" means since those operations do not have any assertions or return completion records, which is all I could imagine this would mean.

GetNamedTimeZoneEpochNanoseconds and GetNamedTimeZoneOffsetNanoseconds do each have a simple _timeZoneIdentifier_ is *"UTC"* assertion in the ECMA-262 default implementation, and this text can be simplified once Temporal GetAvailableNamedTimeZoneIdentifier makes it in.

-In the latter case, the result from AvailableNamedTimeZoneIdentifiers() contains a Time Zone Identifier Record _r_ such that _r_.[[Identifier]] is _id_, and _id_ is valid as the first argument to GetNamedTimeZoneEpochNanoseconds and GetNamedTimeZoneOffsetNanoseconds.
+In the latter case, GetAvailableNamedTimeZoneIdentifier(_id_) returns a Time Zone Identifier Record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs consensus This needs committee consensus before it can be eligible to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants