summaryrefslogtreecommitdiff
path: root/deps/v8/test/intl/regress-8469.js
blob: 7febb51cf988a26db13abea1b76999caf762915e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright 2018 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.

// The following tz are NOT impacted by v8:8469
var some_tz_list = [
  "ciabj",
  "ghacc",
];

// The following tz ARE impacted by v8:8469
var problem_tz_list = [
  "etadd",
  "tzdar",
  "eheai",
  "sttms",
  "arirj",
  "arrgl",
  "aruaq",
  "arluq",
  "mxpvr",
  "brbvb",
  "arbue",
  "caycb",
  "brcgr",
  "cayzs",
  "crsjo",
  "caydq",
  "svsal",
  "cafne",
  "caglb",
  "cagoo",
  "tcgdt",
  "ustel",
  "bolpb",
  "uslax",
  "sxphi",
  "mxmex",
  "usnyc",
  "usxul",
  "usndcnt",
  "usndnsl",
  "ttpos",
  "brpvh",
  "prsju",
  "clpuq",
  "caffs",
  "cayek",
  "brrbr",
  "mxstis",
  "dosdq",
  "brsao",
  "gpsbh",
  "casjf",
  "knbas",
  "lccas",
  "vistt",
  "vcsvd",
  "cayyn",
  "cathu",
  "hkhkg",
  "mykul",
  "khpnh",
  "cvrai",
  "gsgrv",
  "shshn",
  "aubhq",
  "auldh",
  "imdgs",
  "smsai",
  "asppg",
  "pgpom",
];

let expectedTimeZone = (new Intl.DateTimeFormat("en"))
    .resolvedOptions().timeZone;

function testTz(tz) {
  print(tz);
  let timeZone = (new Intl.DateTimeFormat("en-u-tz-" + tz))
      .resolvedOptions().timeZone;
  assertEquals(expectedTimeZone, timeZone);
}

// first test soem tz not impacted by v8:8469 to ensure testTz is correct.
for (var tz of some_tz_list) testTz(tz);
for (var tz of problem_tz_list) testTz(tz);