Skip to content

Fractional milliseconds are rounded to 0.1ms precision #2893

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

Closed
SemmZemm opened this issue Aug 10, 2018 · 2 comments
Closed

Fractional milliseconds are rounded to 0.1ms precision #2893

SemmZemm opened this issue Aug 10, 2018 · 2 comments
Labels
feature something new

Comments

@SemmZemm
Copy link

The fractional milliseconds are rounded to 0.1ms precision when being provided as epoch ms.
https://jsfiddle.net/c1kt3r82/766/

Couldn't you make behave it like v1.20.5?
https://jsfiddle.net/c1kt3r82/767/

@alexcjohnson
Copy link
Collaborator

Heh, recently epoch ms had coarser rounding than strings, until #2847 brought the two into harmony.
3 things to say about this:

  • That v1.20.5 behavior is quite fragile, as you can see if you decrease the overall range a bit, among other things. I was unaware that it even worked to the degree that you demonstrate in your fiddle though, so thanks for pointing it out!
  • At least until v2 where we intend to alter how epoch ms work (given their strange timezone behavior), we do not intend to allow them any better features than strings. Our official stance is that they are tolerated but discouraged in v1.
  • We can certainly have a discussion about how to handle all dates though - 0.1ms precision was chosen to work consistently across the whole supported date range, but that's thousands of years and numbers closer to the unix epoch can do better than this. Within a reasonable range of modern dates we should be able to increase the resolution, looks like 1µs is not out of the question in fact for the current time, though it will take some investigation to see how far into the future (and past) we can allow this. And extending this adaptive handling throughout the rest of our date handling machinery will take a fair bit of effort and a lot of testing.

@gvwilson
Copy link
Contributor

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

3 participants