From 4cb192d0790ee2245207d6f71dfb14fba8d35f43 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 12 Jan 2022 18:39:48 +0100 Subject: [PATCH] Normative: Don't validate numeric timezone in ToRelativeTemporalObject It was checking if parsing TimeZoneNumericUTCOffset from the provided timeZoneName is *not* a list of errors, i.e. it matches the production. If that's the case, it would try to validate and normalize the time zone offset, which would both fail - these steps should apply to an IANA time zone name instead, i.e. when parsing *does* produce a list of errors and the string doesn't match TimeZoneNumericUTCOffset. This mistake was introduced in 2a81fbc, the updated code now matches the validation & normalization steps in ToTemporalZonedDateTime. --- spec/abstractops.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/abstractops.html b/spec/abstractops.html index da8762ccf6..57261a47cc 100644 --- a/spec/abstractops.html +++ b/spec/abstractops.html @@ -493,7 +493,7 @@

ToRelativeTemporalObject ( _options_ )

1. Let _offsetString_ be _result_.[[TimeZoneOffsetString]]. 1. Let _timeZoneName_ be _result_.[[TimeZoneIANAName]]. 1. If _timeZoneName_ is not *undefined*, then - 1. If ParseText(StringToCodePoints(_timeZoneName_), |TimeZoneNumericUTCOffset|) is not a List of errors, then + 1. If ParseText(StringToCodePoints(_timeZoneName_), |TimeZoneNumericUTCOffset|) is a List of errors, then 1. If ! IsValidTimeZoneName(_timeZoneName_) is *false*, throw a *RangeError* exception. 1. Set _timeZoneName_ to ! CanonicalizeTimeZoneName(_timeZoneName_). 1. Let _timeZone_ be ! CreateTemporalTimeZone(_timeZoneName_).