Skip to content

Commit

Permalink
Normative: SystemTimeZoneIdentifier normal offsets
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
justingrant committed Jun 18, 2023
1 parent 3977e33 commit abf3db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/mainadditions.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h1>SystemTimeZoneIdentifier ( ): a String</h1>

<emu-alg>
1. If the implementation only supports the UTC time zone, return *"UTC"*.
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.
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<ins> String _s_ for which ParseText(StringToCodePoints(_s_), |NormalizedUTCOffset|) returns a Parse Node</ins>.
1. <del>If IsTimeZoneOffsetString(_systemTimeZoneString_) is *true*, return _systemTimeZoneString_.</del>
1. Return _systemTimeZoneString_.
</emu-alg>
Expand Down

0 comments on commit abf3db8

Please sign in to comment.