We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
headius
Learn more about funding links in repositories.
Report abuse
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 should return a new DateTime when called with a Rational value. For example, with JRuby 9.1.16.0 and MRI 2.5.0:
DateTime.jd
DateTime
Rational
$ jruby -rdate -e't=212388217200; 4.times {|n| puts DateTime.jd((t + n)/86400r) }' 2018-03-18T23:00:00+00:00 2018-03-18T23:00:01+00:00 2018-03-18T23:00:02+00:00 2018-03-18T23:00:03+00:00
The t value was calculated as:
t
86400 * DateTime.new(1970, 1, 1).jd + Time.utc(2018, 3, 18, 23).to_i
DateTime.jd with the latest 9.2.0.0 snapshot build returns the wrong time when the seconds past the hour are non-zero:
$ jruby -rdate -e't=212388217200; 4.times {|n| puts DateTime.jd((t + n)/86400r) }' 2018-03-18T23:00:00+00:00 2018-03-18T23:00:24+00:00 2018-03-18T23:00:48+00:00 2018-03-18T23:01:12+00:00
It looks like something is causing the seconds past the hour to be multiplied by 24.
The text was updated successfully, but these errors were encountered:
great - thanks. likely a regression due the recent date.rb rewrite ... #5076
Sorry, something went wrong.
69364e2
kares
No branches or pull requests
Environment
Expected Behaviour
DateTime.jd
should return a newDateTime
when called with aRational
value. For example, with JRuby 9.1.16.0 and MRI 2.5.0:The
t
value was calculated as:Actual Behaviour
DateTime.jd
with the latest 9.2.0.0 snapshot build returns the wrong time when the seconds past the hour are non-zero:It looks like something is causing the seconds past the hour to be multiplied by 24.
The text was updated successfully, but these errors were encountered: