Advertisement
Guest User

Bug in to_date with Ruby 1.8.7 and Rails 3.0.11

a guest
Apr 3rd, 2012
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 0.66 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement