Created
June 7, 2011 13:45
-
-
Save jalada/1012283 to your computer and use it in GitHub Desktop.
Time.parse fails with really old dates?
This file contains hidden or 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
REE 1.8.7: | |
ree-1.8.7-2011.03 :001 > require 'time' | |
=> true | |
ree-1.8.7-2011.03 :002 > Time.parse "Tue Oct 27 00:00:00 UTC 1896" | |
ArgumentError: time out of range | |
from /usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/time.rb:180:in `utc' | |
from /usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/time.rb:180:in `make_time' | |
from /usr/local/rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/time.rb:243:in `parse' | |
from (irb):2 | |
Ruby 1.8.7: | |
ruby-1.8.7-p334 :001 > require 'time' | |
=> true | |
ruby-1.8.7-p334 :002 > Time.parse "Tue Oct 27 00:00:00 UTC 1896" | |
=> Tue Oct 27 00:00:00 UTC 1896 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment