From 54b1a3c7393f20152852d8e32a66ad528fd48b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20Osztrogon=C3=A1c?= Date: Fri, 1 Oct 2021 12:59:38 +0200 Subject: [PATCH] Date.prototype.setTime should invalidate local TZA cache (#4786) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #4749. JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu --- jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c b/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c index 5d7f6d071..b02de1bf1 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-date-prototype.c @@ -668,6 +668,9 @@ ecma_builtin_date_prototype_dispatch_routine (uint8_t builtin_routine_id, /**< b } *date_value_p = ecma_date_time_clip (time_num); +#if JERRY_ESNEXT + date_object_p->header.u.cls.u1.date_flags &= (uint8_t) ~ECMA_DATE_TZA_SET; +#endif /* JERRY_ESNEXT */ return ecma_make_number_value (*date_value_p); }