-
Notifications
You must be signed in to change notification settings - Fork 30k
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
regression: fs.utimes/futimes for dates before unix epoch #14017
Comments
@isaacs is this recently introduced in v4.8.3? Is there an earlier version of v4.x where this is not happening? |
It was introduced in #2387 (specifically in #2387 (comment)), backported to version 4.1.0. In other words, only version 4.0.0 in the v4.x branch is not affected by the bug. |
@gireeshpunathil that was a doc update about Infinity and NaN. Are you certain you referenced the correct PR? #15680 is independent from this issue as far as I can tell. |
probably not - I was just following the linked references. |
An observation: On specifying a negative timestamp as a string for values before 1970-01-01T00:00:00.000Z the atime and utime were modified correctly (https://nodejs.org/api/fs.html#fs_fs_utimes_path_atime_mtime_callback).
Should we document this or figure out a way to fix it? Thanks. |
I also cannot reproduce. The example above works fine on node |
As of Node v4, fs.utimes and fs.utimes are truncating the atime and mtime values to a positive integer.
This is incorrect, and makes it impossible to set atime and mtime values before 1970-01-01T00:00:00.000Z without creating a Date object.
It looks like this is the culprit:
The text was updated successfully, but these errors were encountered: