-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent Date.prototype.getTime() value across different Node.js versions #29900
Comments
I have filled similar issue to moment Node.js module: moment/moment#5207, but it seems that the main problem is in Node.js (V8) or even somewhere else... |
The date is formatted by V8 and the ICU libraries and they receive occasional updates that may change the output. Importantly, the embedded timezone database is updated every few months. I'm going to close this out because it's not under the control of Node.js but thanks anyway for the report. |
Bug description
The return value of Date.prototype.getTime() is not consistent with different versions of NodeJS.
It seems that the problem started since NodeJS version 10.4.0
To reproduce
Run following code with different NodeJS verions:
Results from my computer:
date_nodejs_v8.16.1_data.txt
date_nodejs_v10.3.0_data.txt
date_nodejs_v10.4.0_data.txt
date_nodejs_v10.16.3_data.txt
Expected behavior
I think that return value of Date.prototype.getTime() should be the same regardless of NodeJS version.
Addition information:
Output of following code:
with Node.js version 8.16.1:
with Node.js version 10.16.3:
The text was updated successfully, but these errors were encountered: