Method: ActiveSupport::TimeWithZone#to_r

Defined in:
lib/active_support/time_with_zone.rb

#to_rObject

Returns the object’s date and time as a rational number of seconds since the Epoch (January 1, 1970 00:00 UTC).

Time.zone.now.to_r # => (708854548642709/500000)


480
481
482
# File 'lib/active_support/time_with_zone.rb', line 480

def to_r
  utc.to_r
end