[date] Fix Date#getMinutes() test failures
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}
This commit is contained in:
parent
dfef303272
commit
00bb1a77c0
1
AUTHORS
1
AUTHORS
@ -86,6 +86,7 @@ Daniel Andersson <kodandersson@gmail.com>
|
||||
Daniel Bevenius <daniel.bevenius@gmail.com>
|
||||
Daniel Dromboski <dandromb@gmail.com>
|
||||
Daniel James <dnljms@gmail.com>
|
||||
Darshan Sen <raisinten@gmail.com>
|
||||
David Carlier <devnexen@gmail.com>
|
||||
David Manouchehri <david@davidmanouchehri.com>
|
||||
Deepak Mohan <hop2deep@gmail.com>
|
||||
|
@ -3,21 +3,21 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
var date = new Date("2016/01/02 10:00 GMT-8")
|
||||
assertEquals(0, date.getMinutes());
|
||||
assertEquals(0, date.getUTCMinutes());
|
||||
assertEquals(18, date.getUTCHours());
|
||||
|
||||
date = new Date("2016/01/02 10:00 GMT-12")
|
||||
assertEquals(0, date.getMinutes());
|
||||
assertEquals(0, date.getUTCMinutes());
|
||||
assertEquals(22, date.getUTCHours());
|
||||
|
||||
date = new Date("2016/01/02 10:00 GMT-123")
|
||||
assertEquals(23, date.getMinutes());
|
||||
assertEquals(23, date.getUTCMinutes());
|
||||
assertEquals(11, date.getUTCHours());
|
||||
|
||||
date = new Date("2016/01/02 10:00 GMT-0856")
|
||||
assertEquals(56, date.getMinutes());
|
||||
assertEquals(56, date.getUTCMinutes());
|
||||
assertEquals(18, date.getUTCHours());
|
||||
|
||||
date = new Date("2016/01/02 10:00 GMT-08000")
|
||||
assertEquals(NaN, date.getMinutes());
|
||||
assertEquals(NaN, date.getUTCMinutes());
|
||||
assertEquals(NaN, date.getUTCHours());
|
||||
|
Loading…
Reference in New Issue
Block a user