-
Notifications
You must be signed in to change notification settings - Fork 158
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
#2482 made DefaultTimeZone's result is now observable (matters for offset strings) #2584
Comments
I think this is something that the time zone canonicalization proposal should solve. Time zone identifier canonicalization currently isn't a thing in ECMA-262, only in ECMA-402, so there's nothing that Temporal could do about this in ECMA-262's DefaultTimeZone without bringing canonicalization to 262 — which would essentially mean absorbing the time zone canonicalization proposal. I prefer your first bullet point, adding an assertion in DefaultTimeZone. |
Meeting 2023-05-25: We'll handle this by expanding the scope of proposal-canonical-tz (or perhaps by a separate normative PR to 262) to include a normative change to DefaultTimeZone that ensures that offset strings are in normal form before returning them. |
This commit adds prose to clarify that if SystemTimeZoneIdentifier returns an offset time zone identifier, then it should be in normal form like "-05:00" not "-0500" nor "-05". No current implementations support returning offset strings in non- normal form today. So although this commit is normative, it won't break any existing ECMAScript code nor will it require changes to any current implementation. Fixes tc39#2584.
This commit adds prose to clarify that if SystemTimeZoneIdentifier returns an offset time zone identifier, then it should be in normal form like "-05:00" not "-0500" nor "-05". No current implementations support returning offset strings in non- normal form today. So although this commit is normative, it won't break any existing ECMAScript code nor will it require changes to any current implementation. Fixes tc39#2584.
This commit adds prose to clarify that if SystemTimeZoneIdentifier returns an offset time zone identifier, then it should be in normal form like "-05:00" not "-0500" nor "-05". No current implementations support returning offset strings in non- normal form today. So although this commit is normative, it won't break any existing ECMAScript code nor will it require changes to any current implementation. Fixes tc39#2584.
This commit adds prose to clarify that if SystemTimeZoneIdentifier returns an offset time zone identifier, then it should be in normal form like "-05:00" not "-0500" nor "-05". No current implementations support returning offset strings in non- normal form today. So although this commit is normative, it won't break any existing ECMAScript code nor will it require changes to any current implementation. Fixes tc39#2584.
This commit adds prose to clarify that if SystemTimeZoneIdentifier returns an offset time zone identifier, then it should be in normal form like "-05:00" not "-0500" nor "-05". No current implementations support returning offset strings in non- normal form today. So although this commit is normative, it won't break any existing ECMAScript code nor will it require changes to any current implementation. Fixes tc39#2584.
This commit adds prose to clarify that if SystemTimeZoneIdentifier returns an offset time zone identifier, then it should be in normal form like "-05:00" not "-0500" nor "-05". No current implementations support returning offset strings in non- normal form today. So although this commit is normative, it won't break any existing ECMAScript code nor will it require changes to any current implementation. Fixes tc39#2584.
This commit adds prose to clarify that if SystemTimeZoneIdentifier returns an offset time zone identifier, then it should be in normal form like "-05:00" not "-0500" nor "-05". No current implementations support returning offset strings in non- normal form today. So although this commit is normative, it won't break any existing ECMAScript code nor will it require changes to any current implementation. Fixes tc39#2584.
This commit adds a "normalized format of a time zone identifier" definition, and uses it to ensure that SystemTimeZoneIdentifier only returns normalized identifiers like "-05:00" (not "-0500" nor "-05") or "America/Los_Angeles" (not "AMERICA/LOS_ANGELES" nor "AmErIcA/lOs_AnGeLeS"). No current implementations return offset strings in non-normalized format, so although this is a normative change, it won't break existing ECMAScript code nor will it require changes to current implementations. Fixes tc39#2584.
This commit adds a "normalized format of a time zone identifier" definition, and uses it to ensure that SystemTimeZoneIdentifier only returns normalized identifiers like "-05:00" (not "-0500" nor "-05") or "America/Los_Angeles" (not "AMERICA/LOS_ANGELES" nor "AmErIcA/lOs_AnGeLeS"). No current implementations return offset strings in non-normalized format, so although this is a normative change, it won't break existing ECMAScript code nor will it require changes to current implementations. Fixes tc39#2584.
This commit adds a "normalized format of a time zone identifier" definition, and uses it to ensure that SystemTimeZoneIdentifier only returns normalized identifiers like "-05:00" (not "-0500" nor "-05") or "America/Los_Angeles" (not "AMERICA/LOS_ANGELES" nor "AmErIcA/lOs_AnGeLeS"). No current implementations return offset strings in non-normalized format, so although this is a normative change, it won't break existing ECMAScript code nor will it require changes to current implementations. Fixes tc39#2584.
This commit adds a "normalized format of a time zone identifier" definition, and uses it to ensure that SystemTimeZoneIdentifier only returns normalized identifiers like "-05:00" (not "-0500" nor "-05") or "America/Los_Angeles" (not "AMERICA/LOS_ANGELES" nor "AmErIcA/lOs_AnGeLeS"). No current implementations return offset strings in non-normalized format, so although this is a normative change, it won't break existing ECMAScript code nor will it require changes to current implementations. Fixes tc39#2584.
This commit adds a "normalized format of a time zone identifier" definition, and uses it to ensure that SystemTimeZoneIdentifier only returns normalized identifiers like "-05:00" (not "-0500" nor "-05") or "America/Los_Angeles" (not "AMERICA/LOS_ANGELES" nor "AmErIcA/lOs_AnGeLeS"). No current implementations return offset strings in non-normalized format, so although this is a normative change, it won't break existing ECMAScript code nor will it require changes to current implementations. Fixes tc39#2584.
This commit adds a "normalized format of a time zone identifier" definition, and uses it to ensure that SystemTimeZoneIdentifier only returns normalized identifiers like "-05:00" (not "-0500" nor "-05") or "America/Los_Angeles" (not "AMERICA/LOS_ANGELES" nor "AmErIcA/lOs_AnGeLeS"). No current implementations return offset strings in non-normalized format, so although this is a normative change, it won't break existing ECMAScript code nor will it require changes to current implementations. Fixes tc39#2584.
This commit adds a "normalized format of a time zone identifier" definition, and uses it to ensure that SystemTimeZoneIdentifier only returns normalized identifiers like "-05:00" (not "-0500" nor "-05") or "America/Los_Angeles" (not "AMERICA/LOS_ANGELES" nor "AmErIcA/lOs_AnGeLeS"). No current implementations return offset strings in non-normalized format, so although this is a normative change, it won't break existing ECMAScript code nor will it require changes to current implementations. Fixes tc39#2584.
This commit adds a "normalized format of a time zone identifier" definition, and uses it to ensure that SystemTimeZoneIdentifier only returns normalized identifiers like "-05:00" (not "-0500" nor "-05") or "America/Los_Angeles" (not "AMERICA/LOS_ANGELES" nor "AmErIcA/lOs_AnGeLeS"). No current implementations return offset strings in non-normalized format, so although this is a normative change, it won't break existing ECMAScript code nor will it require changes to current implementations. Fixes tc39#2584.
When we introduced
Temporal.Now.timeZoneId()
as part of the implementer-requested string slots change in #2482, we inadvertently made the result of DefaultTimeZone observable. Previously, this AO's result was only surfaced indirectly:Intl.DateTimeFormat.prototype.resovledOptions().timeZone
. The ID is guaranteed to be in its canonical form if it's an IANA zone, and if it's an offset string then it will throw until ECMA-402 supports offset time zones (see ECMA-402 should allow numeric-offset host time zones ecma402#683).In both of the "indirectly exposed" cases above, if the system time zone is an IANA time zone, then it will be canonicalized. But if it's an offset string, then the spec is unclear about what will happen.
The spec text for DefaultTimeZone (both in 402 and in tc39/ecma262#3035 which should hopefully be merged soon) is clear that IANA time zones will be canonicalized. But both are silent about offset time zones. I'm open to adding a canonicalization step to that 262 AO later, e.g. in a normative PR or in proposal-canonical-tz, but wondering what to do in the meantime (or if that doesn't happen).
What should
Temporal.Now.timeZoneId()
do if the input is an offset string?The text was updated successfully, but these errors were encountered: