Read more

ActiveRecord 3+ auto-converts times to UTC by default. Hilarity ensues.

Henning Koch
September 05, 2011Software engineer at makandra GmbH

Remember how Rails 2 came with an awesome feature that broke all code using Time.now or Time.parse?

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

This behavior is now the default for Rails 3. Disable it by adding the following to your config/application.rb:

config.active_record.default_timezone = :local
config.active_record.time_zone_aware_attributes = false    
Posted by Henning Koch to makandra dev (2011-09-05 16:17)