SHARE
TWEET

Bug in to_date with Ruby 1.8.7 and Rails 3.0.11

a guest Apr 3rd, 2012 58 Never
  1. % ruby -v                                                                                                                                                                               !10391
  2. ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
  3.  
  4. % bundle exec rails console
  5. Loading development environment (Rails 3.0.11)
  6. >> Time.now
  7. => Tue Apr 03 13:07:13 +0300 2012
  8. >> Time.zone
  9. => #<ActiveSupport::TimeZone:0x10168d650 @tzinfo=#<TZInfo::TimezoneProxy: Etc/UTC>, @name="UTC", @utc_offset=nil, @current_period=nil>
  10. >> Time.zone = "Chihuahua"
  11. => "Chihuahua"
  12. >> Time.zone.now
  13. => Tue, 03 Apr 2012 04:07:30 MDT -06:00
  14. >> Time.zone.now.to_date
  15. => 2012-04-02
RAW Paste Data
Top