{"action":"opened","issue":{"url":"https://api.github.com/repos/jruby/jruby/issues/5092","repository_url":"https://api.github.com/repos/jruby/jruby","labels_url":"https://api.github.com/repos/jruby/jruby/issues/5092/labels{/name}","comments_url":"https://api.github.com/repos/jruby/jruby/issues/5092/comments","events_url":"https://api.github.com/repos/jruby/jruby/issues/5092/events","html_url":"https://github.com/jruby/jruby/issues/5092","id":306299517,"number":5092,"title":"DateTime.jd returns incorrect times with 9.2.0.0-SNAPSHOT","user":{"login":"philr","id":190067,"avatar_url":"https://avatars3.githubusercontent.com/u/190067?v=4","gravatar_id":"","url":"https://api.github.com/users/philr","html_url":"https://github.com/philr","followers_url":"https://api.github.com/users/philr/followers","following_url":"https://api.github.com/users/philr/following{/other_user}","gists_url":"https://api.github.com/users/philr/gists{/gist_id}","starred_url":"https://api.github.com/users/philr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philr/subscriptions","organizations_url":"https://api.github.com/users/philr/orgs","repos_url":"https://api.github.com/users/philr/repos","events_url":"https://api.github.com/users/philr/events{/privacy}","received_events_url":"https://api.github.com/users/philr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-19T00:07:41Z","updated_at":"2018-03-19T00:07:41Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Environment\r\n\r\n* jruby 9.2.0.0-SNAPSHOT (2.4.1) 2018-03-15 36b44df OpenJDK 64-Bit Server VM 25.151-b12 on 1.8.0_151-8u151-b12-0ubuntu0.17.10.2-b12 +jit [linux-x86_64]\r\n* Linux linuxdev 4.13.0-37-generic #<span></span>42-Ubuntu SMP Wed Mar 7 14:13:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n### Expected Behaviour\r\n\r\n`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:\r\n\r\n```\r\n$ jruby -rdate -e't=212388217200; 4.times {|n| puts DateTime.jd((t + n)/86400r) }'\r\n2018-03-18T23:00:00+00:00\r\n2018-03-18T23:00:01+00:00\r\n2018-03-18T23:00:02+00:00\r\n2018-03-18T23:00:03+00:00\r\n```\r\n\r\nThe `t` value was calculated as:\r\n\r\n```ruby\r\n86400 * DateTime.new(1970, 1, 1).jd + Time.utc(2018, 3, 18, 23).to_i\r\n```\r\n\r\n### Actual Behaviour\r\n\r\n`DateTime.jd` with the latest 9.2.0.0 snapshot build returns the wrong time when the seconds past the hour are non-zero:\r\n\r\n```\r\n$ jruby -rdate -e't=212388217200; 4.times {|n| puts DateTime.jd((t + n)/86400r) }'\r\n2018-03-18T23:00:00+00:00\r\n2018-03-18T23:00:24+00:00\r\n2018-03-18T23:00:48+00:00\r\n2018-03-18T23:01:12+00:00\r\n```\r\n\r\nIt looks like something is causing the seconds past the hour to be multiplied by 24."}}
{"actor":{"display_login":"philr"}}