From 44525f5865c2081694733808c99fd0c91c19ac46 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Tue, 13 Apr 2021 14:35:52 -0700 Subject: [PATCH] Fix faulty assertion of IsValidTimeZoneName 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". --- spec/abstractops.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/abstractops.html b/spec/abstractops.html index 7d21e3bf76..73bd545c96 100644 --- a/spec/abstractops.html +++ b/spec/abstractops.html @@ -1478,7 +1478,7 @@

ParseTemporalTimeZoneString ( _isoString_ )

1. Let _offsetNanoseconds_ be _sign_ × (((_hours_ × 60 + _minutes_) × 60 + _seconds_) × 109 + _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*,