v8/test/intl/regress-364374.js
Frank Tang 8ef3e03ea4 Fix special case timezone RangeError
Bug: chromium:364374
Change-Id: I361403b26529860c4240d06766a82937ee8ca115
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150070
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67158}
2020-04-15 18:19:00 +00:00

61 lines
1.1 KiB
JavaScript

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const special_time_zones = [
"America/Argentina/ComodRivadavia",
"America/Knox_IN",
"Antarctica/McMurdo",
"Australia/ACT",
"Australia/LHI",
"Australia/NSW",
"Brazil/DeNoronha",
"CET",
"CST6CDT",
"Chile/EasterIsland",
"Etc/UCT",
"EET",
"EST",
"EST5EDT",
"GB",
"GB-Eire",
"GMT+0",
"GMT-0",
"GMT0",
"HST",
"MET",
"MST",
"MST7MDT",
"Mexico/BajaNorte",
"Mexico/BajaSur",
"NZ",
"NZ-CHAT",
"PRC",
"PST8PDT",
"ROC",
"ROK",
"UCT",
"US/Alaska",
"US/Aleutian",
"US/Arizona",
"US/Central",
"US/East-Indiana",
"US/Eastern",
"US/Hawaii",
"US/Indiana-Starke",
"US/Michigan",
"US/Mountain",
"US/Pacific",
"US/Pacific-New",
"US/Samoa",
"W-SU",
"WET",
];
special_time_zones.forEach(function(timeZone) {
assertDoesNotThrow(() => {
// Make sure the following wont throw RangeError exception
df = new Intl.DateTimeFormat(undefined, {timeZone});
});
})