jruby 9.1.13.0 (2.3.3) 2017-09-06 8e1c115 OpenJDK 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [OpenBSD-x86_64]
OpenBSD systemname.local 6.2 GENERIC.MP#140 amd64
Also tested on:
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]
Windows 10 Professional
Expected Behavior
Same Results as CRuby for the following code:
require'date'# after date of calendar reform in 1582: correctpTime.at(-12000000000).utcpTime.at(-12000000000).utc.to_datetime# before date of calendar reform in 1582: incorrectpTime.at(-12500000000).utcpTime.at(-12500000000).utc.to_datetime
CRuby Results:
1589-09-26 02:40:00 UTC
#<DateTime: 1589-09-26T02:40:00+00:00 ((2301699j,9600s,0n),+0s,2299161j)>
1573-11-22 01:46:40 UTC
#<DateTime: 1573-11-22T01:46:40+00:00 ((2295922j,6400s,0n),+0s,2299161j)>
Actual Behavior
JRuby Results:
1589-09-26 02:40:00 UTC
#<DateTime: 1589-09-26T02:40:00+00:00 ((2301699j,9600s,0n),+0s,2299161j)>
1573-11-22 01:46:40 UTC
#<DateTime: 1573-11-12T01:46:40+00:00 ((2295912j,6400s,0n),+0s,2299161j)>
Note the change from 1573-11-22 to 1573-11-12 in last line of output.
The text was updated successfully, but these errors were encountered:
I suspect this is because Joda Time, the time library we're using, defaults to ISO8601 time, while I believe UNIX time is Gregorian/Julian. I'm testing a patch that uses GJ, but I'm on the fence about fixing this.
Environment
jruby 9.1.13.0 (2.3.3) 2017-09-06 8e1c115 OpenJDK 64-Bit Server VM 25.144-b01 on 1.8.0_144-b01 +jit [OpenBSD-x86_64]
OpenBSD systemname.local 6.2 GENERIC.MP#140 amd64
Also tested on:
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]
Windows 10 Professional
Expected Behavior
Same Results as CRuby for the following code:
CRuby Results:
Actual Behavior
JRuby Results:
Note the change from
1573-11-22
to1573-11-12
in last line of output.The text was updated successfully, but these errors were encountered: