Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't cache the utc_offset we are already caching the timezone [#4301]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit e329eab0c9deec5180ccc8a0c7990239aa70b43e 1 parent 4b08679
@spastorino spastorino authored jeremy committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 activesupport/lib/active_support/values/time_zone.rb
View
4 activesupport/lib/active_support/values/time_zone.rb
@@ -181,10 +181,12 @@ def initialize(name, utc_offset, tzinfo = nil)
@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
Please sign in to comment.
Something went wrong with that request. Please try again.