Skip to content

Commit

Permalink
Fix lutimes nanoseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Apr 3, 2024
1 parent ef93119 commit 82bae74
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 82bae74

Please sign in to comment.