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
DateTime.jd ignores fractional seconds #8034
Comments
I wonder if this is an out of date stdlib. |
Welp, there's yer problem right there: jruby/core/src/main/java/org/jruby/ext/date/RubyDate.java Lines 497 to 508 in 9f38144
We normalize seconds into a long, so there's no where for a rational to go. This logic is just out of date since CRuby started accepting Rational here. |
The CRuby code starts here and involves many macros and local variable twiddling... so I did not start a port attempt. It's clear this logic has grown and we'll need to expand our handling of the time elements accordingly. |
Environment Information
Happens with both:
Expected Behavior
Respects fractional seconds, as in CRuby:
Actual Behavior
Ignores fractional seconds:
Found by Sequel's tests after a refactor.
The text was updated successfully, but these errors were encountered: