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 precision issues in Time by avoiding conversions to nanoseconds. #745

Merged
merged 3 commits into from May 21, 2013

Conversation

Projects
None yet
2 participants
@tychobrailleur
Copy link
Contributor

tychobrailleur commented May 19, 2013

Fixes #652

Calculations using Time are done to the nanosecond. When using dates,
the Unix time converted into nanosecond is too big (in absolute value)
to fit in a long. The idea in this fix is to separate the millisecond
calculation from the nanosecond one to avoid converting these dates
into nanoseconds.

tychobrailleur added some commits May 19, 2013

Fix precision issues in Time by avoiding conversions to nanoseconds.
Calculations using Time are done to the nanosecond.  When using dates,
the Unix time converted into nanosecond is too big (in absolute value)
to fit in a `long`.  The idea in this fix is to separate the millisecond
calculation from the nanosecond one to avoid converting these dates
into nanoseconds.

headius added a commit that referenced this pull request May 21, 2013

Merge pull request #745 from tychobrailleur/time_precision
Fix precision issues in Time by avoiding conversions to nanoseconds.

@headius headius merged commit 7f4335c into jruby:master May 21, 2013

1 check was pending

default The Travis CI build is in progress
Details
@headius

This comment has been minimized.

Copy link
Member

headius commented May 21, 2013

CI is in a weird state, but your code looks fine. Merging and will test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.