Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ext/node): Add fs.lutimes / fs.lutimesSync #23172

Merged
merged 10 commits into from
Jul 3, 2024
Prev Previous commit
Next Next commit
Fix lutimes nanoseconds
  • Loading branch information
nathanwhit committed Jul 1, 2024
commit a8deae04a0ffa4beb3998fe0e1d63db572d9459f
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