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
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).
The text was updated successfully, but these errors were encountered:
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.
8.11.1
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:mtime
would round up to the next millisecond (e.g.1494910432092.7104
)1494910432093
forNumber(fs.Stats.mtime)
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 withnode.js 7.x
and then update to8.x
the comparisons are not working anymore (this is how I noticed it).The text was updated successfully, but these errors were encountered: