-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
Version: v6.10.3
Platform: Windows 10 64-bit
Subsystem: fs
Disk format: NTFS
This issue is related to #13255 .
let fs = require('fs');
let src = 'path/to/src';
let src_stats = fs.statSync(src);
let dest = 'path/to/dest'
if (fs.existsSync(dest)) {
fs.utimesSync(dest, src_stats.atime, src_stats.mtime);
}
let dest_stats = fs.statSync(dest);
console.log(src_stats.mtime);
console.log(dest_stats.mtime);
console.log(src_stats.mtime == dest_stats.mtime);output:
2017-05-11T06:35:33.501Z
2017-05-11T06:35:33.000Z
false
So the millisecond part of mtime is discarded when setting the time but not when getting the time.
Why is this inconsistent?
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.