Skip to content

Commit

Permalink
deps: V8: cherry-pick 00bb1a77c03e
Browse files Browse the repository at this point in the history
Original commit message:

    [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}

Refs: v8/v8@00bb1a7
Signed-off-by: Darshan Sen <darshan.sen@postman.com>

PR-URL: nodejs#39829
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
RaisinTen authored and targos committed Aug 29, 2021
1 parent 8e52fc8 commit 9814ad4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.8',
'v8_embedder_string': '-node.9',

##### V8 defaults for Node.js #####

Expand Down
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
10 changes: 5 additions & 5 deletions deps/v8/test/mjsunit/regress/regress-crbug-422858.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());

0 comments on commit 9814ad4

Please sign in to comment.