You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 OpenJDK 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [OpenBSD-x86_64]
jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 +jit [mswin32-x86_64]
Expected Behavior
CRuby 2.3, CRuby 2.5, and JRuby 9.1 all return correct results:
$ ruby -r date -ve "d = Date.new(-1); p d; p d.to_time"
ruby 2.3.0p0 (2015-12-25 revision 53290) [x64-mingw32]
#<Date: -0001-01-01 ((1720693j,0s,0n),+0s,2299161j)>
-0001-01-01 00:00:00 -0800
$ ruby -r date -ve "d = Date.new(-1); p d; p d.to_time"
ruby 2.5.0p0 (2017-12-25 revision 61468) [x64-mingw32]
#<Date: -0001-01-01 ((1720693j,0s,0n),+0s,2299161j)>
-0001-01-01 00:00:00 -0800
$ jruby -r date -ve "d = Date.new(-1); p d; p d.to_time"
jruby 9.1.12.0 (2.3.3) 2017-06-15 33c6439 Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 +jit [mswin32-x86_64]
#<Date: -0001-01-01 ((1720693j,0s,0n),+0s,2299161j)>
-0001-01-01 00:00:00 -0752
Actual Behavior
JRuby 9.2 has the Time value wrong:
$ jruby -r date -ve "d = Date.new(-1); p d; p d.to_time"
jruby 9.2.0.0 (2.5.0) 2018-05-24 81156a8 Java HotSpot(TM) 64-Bit Server VM 25.131-b11 on 1.8.0_131-b11 +jit [mswin32-x86_64]
#<Date: -0001-01-01 ((1720693j,0s,0n),+0s,2299161j)>
-0002-01-01 00:00:00 -0752
While not shown here, this also affects DateTime#to_time, which I'm guessing uses the same implementation.
Also note that both JRuby versions have a different timezone offset compared to MRI, but I'm not sure if that is a bug or just the result of using different timezone settings between Java and C.
I thought this may be related to #5191, but looking at the fix for that, I think it may be a different issue. However, I did not check the master branch to see if this has already been fixed.
The text was updated successfully, but these errors were encountered:
Environment
Tested on:
Expected Behavior
CRuby 2.3, CRuby 2.5, and JRuby 9.1 all return correct results:
Actual Behavior
JRuby 9.2 has the Time value wrong:
While not shown here, this also affects
DateTime#to_time
, which I'm guessing uses the same implementation.Also note that both JRuby versions have a different timezone offset compared to MRI, but I'm not sure if that is a bug or just the result of using different timezone settings between Java and C.
I thought this may be related to #5191, but looking at the fix for that, I think it may be a different issue. However, I did not check the master branch to see if this has already been fixed.
The text was updated successfully, but these errors were encountered: