aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2008-03-28 04:35:48 +0000
committerGeoff Buesing <gbuesing@gmail.com>2008-03-28 04:35:48 +0000
commitc62db052a0c188c405ad97abec9dd2cec2b9b1d8 (patch)
treec71dbe96c414b17fb1a68e0951adc7bb3b0dbb59 /railties
parent59183eec6f8d3e5d1ac5046dbd4f5cefc7041256 (diff)
downloadrails-c62db052a0c188c405ad97abec9dd2cec2b9b1d8.tar.gz
rails-c62db052a0c188c405ad97abec9dd2cec2b9b1d8.tar.bz2
rails-c62db052a0c188c405ad97abec9dd2cec2b9b1d8.zip
config.time_zone and TimeWithZone#marshal_load accept tzinfo/Olson identifiers
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9108 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/lib/initializer.rb2
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