Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.regressionIssues related to regressions.Issues related to regressions.
Description
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:
functiontoUnixTimestamp(time){// eslint-disable-next-line eqeqeqif(typeoftime==='string'&&+time==time){return+time;}if(Number.isFinite(time)){if(time<0){returnDate.now()/1000;Metadata
Metadata
Assignees
Labels
fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.regressionIssues related to regressions.Issues related to regressions.