From bd8f0871c2791f30b644aeeec98da7cbb15b2168 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sun, 2 Oct 2016 17:02:27 +0100 Subject: Revert "Merge pull request #25880 from ryandv/fix_performance_regression_in_timewithzone_to_time" Turns out trying to cache on localtime with arguments is too hard so we'll do it on DateAndTime::Compatibility#to_time instead. This reverts commit 3132fa6b7d9585e04eb44b25b55d298391b040b5, reversing changes made to 6949f8e5e7dc901d4e04ebab6c975afb33ca44c9. --- activesupport/lib/active_support/time_with_zone.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index c35588fbae..8de8120fba 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -80,7 +80,7 @@ module ActiveSupport # Returns a Time instance of the simultaneous time in the system timezone. def localtime(utc_offset = nil) - @localtime ||= utc.getlocal(utc_offset) + utc.getlocal(utc_offset) end alias_method :getlocal, :localtime -- cgit v1.2.3