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 }}
Repository navigation
fs.Stats mtime/atime/ctime rounding differences between node.js 7.x and 8.x #19897
It looks like node.js 8.x introduced higher precision for the times returned in fs.Stats (e.g. fs.statSync). I can see rounding differences when comparing the result from node.js 7.x to 8.x which I was not expecting. Steps:
have a folder which mtime would round up to the next millisecond (e.g. 1494910432092.7104)
node.js 8.x returns 1494910432093 for Number(fs.Stats.mtime)
node.js 7.x returns 1494910432092
I would argue the 8.x behaviour is probably the expected one but I was not seeing this as a breaking change in the release notes so it should maybe be documented. If you store these times in some DB with node.js 7.x and then update to 8.x the comparisons are not working anymore (this is how I noticed it).
While I think it would be nice to document this (if that's even the right thing to do), I'm also not optimistic about that happening given the amount of time this issue has been open. I'm going to close this out but if someone feels strongly, feel free to reopen and we can revisit.
Activity
bpasero commentedon Apr 9, 2018
Actually I can reproduce this also on
macOSwithctime.ryzokuken commentedon Apr 11, 2018
I don't know if it helps, but Node.js 7 has reached it's EOL. Are you sure it isn't just because of a change which was backported to LTS?
That said, I don't think breaking changes are backported.
apapirovski commentedon Apr 12, 2018
Probably a good idea to document if this did change.
/cc @nodejs/fs
joyeecheung commentedon Apr 12, 2018
Might be related to #11665
apapirovski commentedon Nov 29, 2018
While I think it would be nice to document this (if that's even the right thing to do), I'm also not optimistic about that happening given the amount of time this issue has been open. I'm going to close this out but if someone feels strongly, feel free to reopen and we can revisit.