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