00bb1a77c0
After building V8 using Clang (./out/x64.release/v8_build_config.json says that "is_clang" is true), I could reproduce the referenced bug report locally. Replacing the getMinutes() calls with getUTCMinutes() calls fixed the test failure. Signed-off-by: Darshan Sen <raisinten@gmail.com> Bug: v8:11200 Change-Id: Ia36be481f2c8728380d550ead856ef8e51b1069c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093362 Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/main@{#76367}
24 lines
786 B
JavaScript
24 lines
786 B
JavaScript
// 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.
|
|
|
|
var date = new Date("2016/01/02 10:00 GMT-8")
|
|
assertEquals(0, date.getUTCMinutes());
|
|
assertEquals(18, date.getUTCHours());
|
|
|
|
date = new Date("2016/01/02 10:00 GMT-12")
|
|
assertEquals(0, date.getUTCMinutes());
|
|
assertEquals(22, date.getUTCHours());
|
|
|
|
date = new Date("2016/01/02 10:00 GMT-123")
|
|
assertEquals(23, date.getUTCMinutes());
|
|
assertEquals(11, date.getUTCHours());
|
|
|
|
date = new Date("2016/01/02 10:00 GMT-0856")
|
|
assertEquals(56, date.getUTCMinutes());
|
|
assertEquals(18, date.getUTCHours());
|
|
|
|
date = new Date("2016/01/02 10:00 GMT-08000")
|
|
assertEquals(NaN, date.getUTCMinutes());
|
|
assertEquals(NaN, date.getUTCHours());
|