Skip to content

Commit

Permalink
Fix lutimes nanoseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Jul 1, 2024
1 parent 1f2e8e3 commit a8deae0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/node/polyfills/_fs/_fs_lutimes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function getValidUnixTime(
const unixSeconds = toUnixTimestamp(value);

const seconds = MathTrunc(unixSeconds);
const nanoseconds = MathTrunc(unixSeconds - seconds) * 1e6;
const nanoseconds = MathTrunc((unixSeconds * 1e3) - (seconds * 1e3)) * 1e6;

return [
seconds,
Expand Down

0 comments on commit a8deae0

Please sign in to comment.