diff options
author | Andrew White <andrew.white@unboxed.co> | 2016-10-02 17:02:27 +0100 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2016-10-02 17:02:27 +0100 |
commit | bd8f0871c2791f30b644aeeec98da7cbb15b2168 (patch) | |
tree | 526444b4a45d78812f83e6a537af327ebe0a940d /activesupport | |
parent | 6c1dac00dfefd9afd12b64d7f9b5964d8c58d73b (diff) | |
download | rails-bd8f0871c2791f30b644aeeec98da7cbb15b2168.tar.gz rails-bd8f0871c2791f30b644aeeec98da7cbb15b2168.tar.bz2 rails-bd8f0871c2791f30b644aeeec98da7cbb15b2168.zip |
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.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 <tt>Time</tt> 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 |