From 44b1d4c40e5b6ead983fd5f82421eae2a948a8ee Mon Sep 17 00:00:00 2001 From: Justin Grant Date: Sat, 17 Jun 2023 17:48:56 -0700 Subject: [PATCH] Normative: fix SystemTimeZoneIdentifier offsets 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 #2584. --- spec/abstractops.html | 3 +++ spec/mainadditions.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/spec/abstractops.html b/spec/abstractops.html index 8ce2455ce3..3c28c9e22f 100644 --- a/spec/abstractops.html +++ b/spec/abstractops.html @@ -1101,6 +1101,9 @@

ISO 8601 grammar

UTCOffsetWithSubMinuteComponents[Extended] : Sign Hour[+Padded] TimeSeparator[?Extended] MinuteSecond TimeSeparator[?Extended] MinuteSecond Fraction? + NormalizedUTCOffset : + ASCIISign Hour[+Padded] `:` MinuteSecond + UTCOffsetMinutePrecision : Sign Hour[+Padded] Sign Hour[+Padded] TimeSeparator[+Extended] MinuteSecond diff --git a/spec/mainadditions.html b/spec/mainadditions.html index 86ac787720..7623bb6a1a 100644 --- a/spec/mainadditions.html +++ b/spec/mainadditions.html @@ -283,7 +283,7 @@

SystemTimeZoneIdentifier ( ): a String

1. If the implementation only supports the UTC time zone, return *"UTC"*. - 1. Let _systemTimeZoneString_ be the String representing the host environment's current time zone, either: a primary time zone identifier; or an offset time zone identifier. + 1. [declared="s"] Let _systemTimeZoneString_ be the String representing the host environment's current time zone, either: a primary time zone identifier; or an offset time zone identifier String _s_ for which ParseText(StringToCodePoints(_s_), |NormalizedUTCOffset|) returns a Parse Node. 1. Return _systemTimeZoneString_.