mirror of https://github.com/lukechilds/node.git
Browse Source
Original commit message: Allow ICU to normalize time zones There's at least one case of a time zone alias: Asia/Kathmandu aliases Asia/Katmandu. ICU seems to normalize to the (deprecated) latter choice. V8 internationalization choked on this change; this patch interprets ICU's output more precisely and allows it. BUG=chromium:487322 R=jungshik,adamk LOG=Y Review URL: https://codereview.chromium.org/1509273007 Cr-Commit-Position: refs/heads/master@{#32769} PR-URL: https://github.com/nodejs/node/pull/15562V8-icu-patch-4.x
3 changed files with 15 additions and 2 deletions
@ -0,0 +1,13 @@ |
|||||
|
// Copyright 2015 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.
|
||||
|
|
||||
|
// Normalizes Kat{h,}mandu (chromium:487322)
|
||||
|
df = new Intl.DateTimeFormat('en-US', {'timeZone': 'Asia/Katmandu'}) |
||||
|
assertEquals('Asia/Katmandu', df.resolvedOptions().timeZone); |
||||
|
|
||||
|
df = new Intl.DateTimeFormat('en-US', {'timeZone': 'Asia/Kathmandu'}) |
||||
|
assertEquals('Asia/Katmandu', df.resolvedOptions().timeZone); |
||||
|
|
||||
|
// Throws for unsupported time zones.
|
||||
|
assertThrows(() => Intl.DateTimeFormat(undefined, {timeZone: 'Aurope/Paris'})); |
Loading…
Reference in new issue