instance method
to_r
Ruby on Rails 8.0.4
Since v4.0.13Signature
to_r()
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)
Source
# File activesupport/lib/active_support/time_with_zone.rb, line 478
def to_r
utc.to_r
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 478
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone