rails/rails — pull request #4573 by amatsuda (2012-01-21 11:51:42+00:00)
Title: change AR default_timezone to :utc since it's the default for AR::Railtie

This is an already known inconsistency reported here https://rails.lighthouseapp.com/projects/8994/tickets/5679-activerecordbasedefault_timezone

Since AR 3.0, `AR::Base.default_timezone` is set to `:utc` in Railtie https://github.com/rails/rails/blob/c05f3b0e4f/activerecord/lib/active_record/railtie.rb#L48
then overridden to `:local` at Base or Core
https://github.com/rails/rails/blob/c05f3b0e4f/activerecord/lib/active_record/core.rb#L51

Because of this, `AR::Base.default_timezone` value defers for a Rails app

```
% bundle e rails runner 'p ActiveRecord::Base.default_timezone'
:utc
```
and a Ruby script that doesn't load `AR::Railtie`

```
% ruby -e "require 'active_record'; p ActiveRecord::Base.default_timezone"
:local
```
The next major version up must be the best timing for fixing this inconsistency, so I propose this patch again for 4.0.