Repository navigation
Date.UTC change in precision #56762
Description
Activity
It looks like it changed specifically in 20.18.1 and 22.10.0. Possibly because of #55056 (I did not verify).
EDIT: I tested on
mainand it outputs34447360. Node v23.6.1 is the latest release at the time of writing, and it outputs34448384. Either something recently landed to fix this, or it's a problem related to the release binaries.Reacted by Tony PujalsInteresting. FWIW, I don't get that result on a Mac (Darwin arm64) with either
v23.6.1or with the latest commit onmain(1263efd) forv24.0.0-pre:~/code/thirdparty/node (main) $ ./out/Release/node -v v24.0.0-pre ~/code/thirdparty/node (main) $ ./out/Release/node -e "console.log(Date.UTC(1970, 0, 213503982336, 0, 0, 0, -18446744073709552000))" 34448384~/code/thirdparty/node (main) $ git checkout -b current v23.6.1 Switched to a new branch 'current' ~/code/thirdparty/node (current) $ make clean all ... ~/code/thirdparty/node (current) $ ./out/Release/node -v v23.6.1 ~/code/thirdparty/node (current) $ ./out/Release/node -e "console.log(Date.UTC(1970, 0, 213503982336, 0, 0, 0, -18446744073709552000))" 34448384Cross posting in case it is relevant: @targos mentioned in #56796 (comment) that the build infra updated from macOS 11 to macOS 13 around this time.
github-actions commented
on Apr 22, 2026 on Apr 22, 2026 – with GitHub ActionsContributorMore actionsThis issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.- addedstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.Issues and PRs marked stale due to inactivity and scheduled for automatic closure.
on Apr 22, 2026 github-actions commented
on May 22, 2026 on May 22, 2026 – with GitHub ActionsContributorMore actionsThis issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 240 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
Version
v22.13.1
Platform
Subsystem
No response
What steps will reproduce the bug?
From v20 on, there is a change in the output from the following command:
Versions less than v20 produce the following result:
Comparisons
How often does it reproduce? Is there a required condition?
All versions from v20 on produce a result that is different from previous versions as well as other JavaScript runtimes, including Chrome, Safari, Deno, and Bun.
What is the expected behavior? Why is that the expected behavior?
Unless this result is expected due to increased precision that should be documented, the expected behavior is to produce the same result consistent with Node.js versions before v20 and other JavaScript runtimes, including Chrome, Safari, Deno, and Bun.
What do you see instead?
34448384instead of expected34447360.Additional information
No response