oven-sh/bun

fs.utimesSync sets the time in seconds (so it seems)

Closed

#6,804 opened on Oct 30, 2023

 (2 comments) (0 reactions) (1 assignee)Rust (4,486 forks)batch import
buggood first issuenode.js

Repository metrics

Stars
 (90,348 stars)
PR merge metrics
 (Avg merge 1d 17h) (357 merged PRs in 30d)

Description

What version of Bun is running?

1.0.7+b0393fba6200d8573f3433fb0af258a0e33ac157

What platform is your computer?

Darwin 21.6.0 x86_64 i386

What steps can reproduce the bug?

fs.utimesSync(pathname, atime, mtime)
console.log(fs.statSync(pathname).mtime.valueOf())

result always ends with "000" with no milliseconds

What is the expected behavior?

mtime should be set precisely

What do you see instead?

tested it also with node v18.17.1 and i get the correct results

Additional information

No response

Contributor guide