Created
July 14, 2013 05:08
-
-
Save Toady00/5993282 to your computer and use it in GitHub Desktop.
JRuby discrepancy with Time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# irb session using: jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_13-b20 [darwin-x86_64] | |
Time.new(2013, 1, 1, 12, 0, 0, "-05:00") | |
#=> 2013-01-01 12:00:00 +0500 | |
Time.new(2013, 1, 1, 12, 0, 0, "+05:00") | |
#=> 2013-01-01 12:00:00 -0500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# irb session using: ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-darwin12.3.0] | |
Time.new(2013, 1, 1, 12, 0, 0, "-05:00") | |
#=> 2013-01-01 12:00:00 -0500 | |
Time.new(2013, 1, 1, 12, 0, 0, "+05:00") | |
#=> 2013-01-01 12:00:00 +0500 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It isn't obvious at first glance, but the signs of the offsets are reversed in JRuby. I figured this should be an easy fix, but I'm not familiar with the JRuby code base. If someone could point me in the right direction, I'll try to create a fix and PR.