diff options
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/time_with_zone.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 9d1147620c..f91225289d 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -84,6 +84,12 @@ module ActiveSupport 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. # |