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
This is probably a regression from the recent date.rb rewrite #5076.
DateTime.jd should set the sec_fraction of the instantiated DateTime. For example, with JRuby 9.1.16.0:
DateTime.jd
sec_fraction
DateTime
$ jruby -rdate -e'jd=2123888220001/864000r; d=DateTime.jd(jd); puts d; puts d.sec_fraction' 2018-03-25T23:00:00+00:00 1/10
The jd value was calculated as:
jd
(86400 * DateTime.new(1970, 1, 1).jd + Time.utc(2018, 3, 25, 23).to_i)/86400r + 1/864000r
The current version of DateTime.jd on master discards the fractional part of the second, leaving sec_fraction set to 0:
$ jruby -rdate -e'jd=2123888220001/864000r; d=DateTime.jd(jd); puts d; puts d.sec_fraction' 2018-03-25T23:00:00+00:00 0/1
The text was updated successfully, but these errors were encountered:
25cc7a0
kares
No branches or pull requests
This is probably a regression from the recent date.rb rewrite #5076.
Environment
Expected Behaviour
DateTime.jd
should set thesec_fraction
of the instantiatedDateTime
. For example, with JRuby 9.1.16.0:The
jd
value was calculated as:Actual Behaviour
The current version of
DateTime.jd
on master discards the fractional part of the second, leavingsec_fraction
set to 0:The text was updated successfully, but these errors were encountered: