diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-20 10:54:28 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-20 10:54:37 -0700 |
commit | 9934738ed5f05fe78cdf2c4cf5fcaae7227d5e1e (patch) | |
tree | ddaaff12217438a16e85ddc465fde27a418f2417 /activesupport/lib/active_support | |
parent | a90a076613c32f952e4d3e1bb7c828572e808145 (diff) | |
download | rails-9934738ed5f05fe78cdf2c4cf5fcaae7227d5e1e.tar.gz rails-9934738ed5f05fe78cdf2c4cf5fcaae7227d5e1e.tar.bz2 rails-9934738ed5f05fe78cdf2c4cf5fcaae7227d5e1e.zip |
Switch to TimezoneProxy for later support of deferred TZ loading
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/values/time_zone.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 9db6bbafca..bc4fb77f9c 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -317,9 +317,7 @@ module ActiveSupport # TODO: Preload instead of lazy load for thread safety def self.find_tzinfo(name) require 'tzinfo' unless defined?(::TZInfo) - ::TZInfo::Timezone.get(MAPPING[name] || name) - rescue TZInfo::InvalidTimezoneIdentifier - nil + ::TZInfo::TimezoneProxy.new(MAPPING[name] || name) end unless const_defined?(:ZONES) |