From 0e5eb8b17de44e5b1dd431b5df1ce2c237cd05f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 20 Jul 2021 16:39:01 +0200 Subject: [PATCH] deps: restore minimum ICU version to 68 Refs: https://github.com/v8/v8/commit/edac49681843447cc483b164a26d00755870b08c PR-URL: https://github.com/nodejs/node/pull/39470 Reviewed-By: Anna Henningsen Reviewed-By: Beth Griggs Reviewed-By: Jiawen Geng --- deps/v8/src/objects/intl-objects.cc | 7 +++++++ deps/v8/src/objects/intl-objects.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/deps/v8/src/objects/intl-objects.cc b/deps/v8/src/objects/intl-objects.cc index 80a33db3b22a50..df633031870340 100644 --- a/deps/v8/src/objects/intl-objects.cc +++ b/deps/v8/src/objects/intl-objects.cc @@ -2036,12 +2036,19 @@ bool ICUTimezoneCache::GetOffsets(double time_ms, bool is_utc, if (is_utc) { GetTimeZone()->getOffset(time_ms, false, *raw_offset, *dst_offset, status); } else { +#if U_ICU_VERSION_MAJOR_NUM < 69 + static_cast(GetTimeZone()) + ->getOffsetFromLocal(time_ms, icu::BasicTimeZone::kFormer, + icu::BasicTimeZone::kFormer, *raw_offset, + *dst_offset, status); +#else // Note that casting TimeZone to BasicTimeZone is safe because we know that // icu::TimeZone used here is a BasicTimeZone. static_cast(GetTimeZone()) ->getOffsetFromLocal(time_ms, UCAL_TZ_LOCAL_FORMER, UCAL_TZ_LOCAL_FORMER, *raw_offset, *dst_offset, status); +#endif } return U_SUCCESS(status); diff --git a/deps/v8/src/objects/intl-objects.h b/deps/v8/src/objects/intl-objects.h index ec0eb93873b507..d4b4feed686e55 100644 --- a/deps/v8/src/objects/intl-objects.h +++ b/deps/v8/src/objects/intl-objects.h @@ -21,7 +21,7 @@ #include "unicode/locid.h" #include "unicode/uversion.h" -#define V8_MINIMUM_ICU_VERSION 69 +#define V8_MINIMUM_ICU_VERSION 68 namespace U_ICU_NAMESPACE { class BreakIterator;