You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
In node 0.11.11 under windows 7
the file timestamp resolution of fs.stat seems to be 1 millisecond, but if i try to set the timestamps, the resolution seems to be only 1 second. This is inconsistent.
> process.version
'v0.11.11'
> fs.writeFileSync('test.txt', 'abc');
undefined
> fs.statSync('test.txt').mtime.getTime();
1391100066267
> fs.utimesSync('test.txt', new Date(1356171132123), new Date(1356171132123));
undefined
> fs.statSync('test.txt').mtime.getTime();
1356171132000
In node 0.10 the resolution seems to be always 1 second.
> process.version
'v0.10.23'
> fs.writeFileSync('test.txt', 'abc');
undefined
> fs.statSync('test.txt').mtime.getTime();
1391100029000
> fs.utimesSync('test.txt', new Date(1356171132123), new Date(1356171132123));
undefined
> fs.statSync('test.txt').mtime.getTime();
1356171132000
I think the resolution should be either 1 second or 1 millisecond, but not mixed.
The timestamp resolution of the underlying windows filesystem NTFS is 100 nanoseconds, so both solutions would be fine ;-)