Skip to content

Commit

Permalink
Fix faulty assertion of IsValidTimeZoneName
Browse files Browse the repository at this point in the history
In ParseTemporalTimeZoneString, a time zone name may meet the grammar for
time zone names while still not being a supported time zone name.
Therefore, this should be a throw rather than an assertion. This was
probably left over from when the grammar was defined more loosely as "any
string that is a supported time zone name".
  • Loading branch information
ptomato committed Apr 14, 2021
1 parent 6a2e1b9 commit f61f775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/abstractops.html
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ <h1>ParseTemporalTimeZoneString ( _isoString_ )</h1>
1. Let _offsetNanoseconds_ be _sign_ × (((_hours_ × 60 + _minutes_) × 60 + _seconds_) × 10<sup>9</sup> + _nanoseconds_).
1. Let _offsetString_ be ! FormatTimeZoneOffsetString(_offsetNanoseconds_).
1. If _name_ is not *undefined*, then
1. Assert: ! IsValidTimeZoneName(_name_) is *true*.
1. If ! IsValidTimeZoneName(_name_) is *false*, throw a *RangeError* exception.
1. Set _name_ to ! CanonicalizeTimeZoneName(_name_).
1. Return the new Record: {
[[Z]]: *undefined*,
Expand Down

0 comments on commit f61f775

Please sign in to comment.