instance method
to_f
Ruby on Rails 7.2.3
Since v2.2.3Signature
to_f()
Returns the object’s date and time as a floating-point number of seconds since the Epoch (January 1, 1970 00:00 UTC).
Time.zone.now.to_f # => 1417709320.285418
Source
# File activesupport/lib/active_support/time_with_zone.rb, line 453
def to_f
utc.to_f
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 453
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone