From 64f125fe34393aec3b5a96ac38918feb8c893047 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 13 Jan 2022 19:25:36 +0100 Subject: [PATCH] LibJS: Mark CreateTemporalTimeZone("UTC") as infallible This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/ea25cfa --- Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp b/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp index e8595d553a..3bb375ca83 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp +++ b/Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp @@ -240,9 +240,8 @@ ThrowCompletionOr temporal_instant_to_string(GlobalObject& global_object // 4. If outputTimeZone is undefined, then if (output_time_zone.is_undefined()) { - // TODO: Can this really throw...? - // a. Set outputTimeZone to ? CreateTemporalTimeZone("UTC"). - output_time_zone = TRY(create_temporal_time_zone(global_object, "UTC"sv)); + // a. Set outputTimeZone to ! CreateTemporalTimeZone("UTC"). + output_time_zone = MUST(create_temporal_time_zone(global_object, "UTC"sv)); } // 5. Let isoCalendar be ! GetISO8601Calendar().