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

Doc vs polyfill mismatch for timeZone.getOffsetStringFor(), expected string should not show seconds. #2673

Closed
Louis-Aime opened this issue Sep 14, 2023 · 0 comments · Fixed by #2674

Comments

@Louis-Aime
Copy link

The documentation on Temporal.TimeZone says:

This method is similar to timeZone.getOffsetNanosecondsFor(), but returns the offset formatted as a string, with sign, hours, and minutes.

However, the polyfill may add seconds:
mytz = new Temporal.TimeZone('Europe/Paris');
mytz.getOffsetStringFor('1900-02-01T12:00Z'); // '00:09:21'

It should probably round to the nearest minute before computing the string (to be specified).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant