-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
fs.utimes truncate date #13520
Comments
I confirm that this issue also happen on Linux 4.9.29, X86-64, with ext4 fs, node v6.10.2. |
So, fixed on windows:
Broken on WSL (so assuming Ubuntu) refael@refaelux:/mnt/d/code/node$ node ../4node/test-utime-truncation.js
2017-07-10T14:20:16.103Z
2017-07-10T14:20:16.000Z
false
refael@refaelux:/mnt/d/code/node$ node -v
v9.0.0-nightly2017070918069523f8 [edit] test-utime-truncation.jslet fs = require('fs');
let src = __filename;
let src_stats = fs.statSync(src);
let dest = src + '2';
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); |
PR to improve docs #14154 |
refack
added
windows
Issues and PRs related to the Windows platform.
wsl
Issues and PRs related to the Windows Subsystem for Linux.
labels
Jul 22, 2017
@refack Can this be closed? |
Fixed by 64e97b2 |
refack
added
doc
Issues and PRs related to the documentations.
and removed
wsl
Issues and PRs related to the Windows Subsystem for Linux.
labels
Sep 29, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: v6.10.3
Platform: Windows 10 64-bit
Subsystem: fs
Disk format: NTFS
This issue is related to #13255 .
output:
So the millisecond part of
mtime
is discarded when setting the time but not when getting the time.Why is this inconsistent?
The text was updated successfully, but these errors were encountered: