aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorAndrew White <andrew.white@unboxed.co>2016-10-02 17:00:18 +0100
committerAndrew White <andrew.white@unboxed.co>2016-10-02 17:00:18 +0100
commit6c1dac00dfefd9afd12b64d7f9b5964d8c58d73b (patch)
tree4bcd313922d08991dd8734902885ef029146e116 /activesupport/lib
parentda0fdd6bf529df8806ddb4b97e4bb31c95249e0e (diff)
downloadrails-6c1dac00dfefd9afd12b64d7f9b5964d8c58d73b.tar.gz
rails-6c1dac00dfefd9afd12b64d7f9b5964d8c58d73b.tar.bz2
rails-6c1dac00dfefd9afd12b64d7f9b5964d8c58d73b.zip
Revert "Merge pull request #26677 from tbalthazar/26644"
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 9ce2d1b1a43fc4ef3db59849b7412d30583a4074, reversing changes made to 53ede1aff2025d4391d0e05ba471fdaf3110a99c.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index bee481e5f5..c35588fbae 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -80,8 +80,7 @@ module ActiveSupport
# Returns a <tt>Time</tt> instance of the simultaneous time in the system timezone.
def localtime(utc_offset = nil)
- @localtime ||= {}
- @localtime[utc_offset] ||= utc.getlocal(utc_offset)
+ @localtime ||= utc.getlocal(utc_offset)
end
alias_method :getlocal, :localtime