aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/values
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2010-04-20 10:54:28 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2010-04-20 10:54:37 -0700
commit9934738ed5f05fe78cdf2c4cf5fcaae7227d5e1e (patch)
treeddaaff12217438a16e85ddc465fde27a418f2417 /activesupport/lib/active_support/values
parenta90a076613c32f952e4d3e1bb7c828572e808145 (diff)
downloadrails-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/values')
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb4
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)