diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/initializer.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 00d760e99f..97f3b8cf7c 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* config.time_zone accepts TZInfo::Timezone identifiers as well as Rails TimeZone identifiers [Geoff Buesing] + * Rails::Initializer#initialize_time_zone raises an error if value assigned to config.time_zone is not recognized. Rake time zone tasks only require ActiveSupport instead of entire environment [Geoff Buesing] * Stop adding the antiquated test/mocks/* directories and only add them to the path if they're still there for legacy reasons [DHH] diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 9909e6e45e..c60fe3d700 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -353,7 +353,7 @@ module Rails # If assigned value cannot be matched to a TimeZone, an exception will be raised. def initialize_time_zone if configuration.time_zone - zone_default = TimeZone[configuration.time_zone] + zone_default = Time.send!(:get_zone, configuration.time_zone) unless zone_default raise "Value assigned to config.time_zone not recognized. Run `rake -D time` for a list of tasks for finding appropriate time zone names." end |