Skip to content

Preserve milliseconds in Timer date conversions - #1087

Open
agammann wants to merge 1 commit into
standardnotes:mainfrom
agammann:fix/timer-millisecond-precision
Open

agammann wants to merge 1 commit into
standardnotes:mainfrom
agammann:fix/timer-millisecond-precision

Conversation

@agammann

@agammann agammann commented Dec 4, 2026

Copy link
Copy Markdown

Fixes #1085.

Changes

Read milliseconds directly from Date.getTime() and multiply by 1,000 for the microsecond conversion. The previous conversion through Date.toString() discarded fractional seconds. The regression tests now check that both methods preserve all 233 milliseconds in the example from the issue.

Verification

On Node 20, all 24 time package tests passed with 100% coverage. The time package build and ESLint for the changed files passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timer date conversions drop milliseconds

1 participant