diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index f91225289d..74c4a39342 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -80,16 +80,10 @@ module ActiveSupport # Returns a <tt>Time</tt> instance of the simultaneous time in the system timezone. def localtime(utc_offset = nil) - utc.getlocal(utc_offset) + @localtime ||= utc.getlocal(utc_offset) end alias_method :getlocal, :localtime - def to_time_with_caching - @to_time ||= to_time_without_caching - end - alias_method :to_time_without_caching, :to_time - alias_method :to_time, :to_time_with_caching - # Returns true if the current time is within Daylight Savings Time for the # specified time zone. # |