From 64d50bfa618eaf54d8a9c95f963db4f395e5565c Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 30 Mar 2010 20:20:25 -0300 Subject: [PATCH] Don't cache the utc_offset we are already caching the timezone --- .../lib/active_support/values/time_zone.rb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 836f469..658c713 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -181,10 +181,12 @@ module ActiveSupport @name = name @utc_offset = utc_offset @tzinfo = tzinfo + @current_period = nil end def utc_offset - @utc_offset ||= tzinfo.current_period.utc_offset + @current_period ||= tzinfo.current_period + @current_period.utc_offset end # Returns the offset of this time zone as a formatted string, of the -- 1.7.0