From cb100ca02bf0652e39a61e7687a6ac034b1a9c43 Mon Sep 17 00:00:00 2001 From: stopdropandrew Date: Sun, 24 Feb 2013 13:07:20 -0800 Subject: Added `ActiveSupport::TimeWithZone#to_r` for `Time#at` compatibility. --- activesupport/lib/active_support/time_with_zone.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb index 0e6d12a186..98c866ac43 100644 --- a/activesupport/lib/active_support/time_with_zone.rb +++ b/activesupport/lib/active_support/time_with_zone.rb @@ -317,6 +317,10 @@ module ActiveSupport end alias_method :tv_sec, :to_i + def to_r + utc.to_r + end + # Return an instance of Time in the system timezone. def to_time utc.to_time -- cgit v1.2.3