instance method
to_time
Ruby on Rails 8.1.2
Since v2.2.3Signature
to_time()
Returns an instance of Time, either with the same timezone as self, with the same UTC offset as self or in the local system timezone depending on the setting of ActiveSupport.to_time_preserves_timezone.
Source
# File activesupport/lib/active_support/time_with_zone.rb, line 501
def to_time
@to_time_with_timezone ||= getlocal(time_zone)
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 501
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone