From e7046e0ff1282dab9d94c4e9e532e0a5c9d63bab 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 --- common.gypi | 2 +- deps/v8/src/objects/intl-objects.cc | 7 +++++++ deps/v8/src/objects/intl-objects.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/common.gypi b/common.gypi index 8120bed999992f..6862acc20b31c5 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.12', + 'v8_embedder_string': '-node.13', ##### V8 defaults for Node.js ##### diff --git a/deps/v8/src/objects/intl-objects.cc b/deps/v8/src/objects/intl-objects.cc index ac43c319f561a3..ed27597bfd4cfe 100644 --- a/deps/v8/src/objects/intl-objects.cc +++ b/deps/v8/src/objects/intl-objects.cc @@ -2050,12 +2050,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;