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

Restrict GetNamedTimeZoneOffsetNanoseconds return value to less than 24 hours #3101

Open
anba opened this issue Jun 15, 2023 · 2 comments · May be fixed by #3464
Open

Restrict GetNamedTimeZoneOffsetNanoseconds return value to less than 24 hours #3101

anba opened this issue Jun 15, 2023 · 2 comments · May be fixed by #3464

Comments

@anba
Copy link
Contributor

anba commented Jun 15, 2023

GetNamedTimeZoneOffsetNanoseconds should specify that the absolute value of the returned integer is less than nsPerDay (8.64 × 1013).


This came up during review of the Temporal patches for SpiderMonkey.

@michaelficarra
Copy link
Member

Can you explain why a time zone offset can't have a magnitude of 24 hours or more?

@anba
Copy link
Contributor Author

anba commented Jun 16, 2023

This is necessary for compatibility with Temporal (for example tc39/proposal-temporal#2260) and if offsets exceed 24 hours, it's also no longer possible to parse string representations of the offset through UTCOffset, because Hour only goes up to 23.

anba added a commit to anba/ecma262 that referenced this issue Oct 29, 2024
anba added a commit to anba/ecma262 that referenced this issue Oct 29, 2024
anba added a commit to anba/ecma262 that referenced this issue Oct 31, 2024
anba added a commit to anba/ecma262 that referenced this issue Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants