instance method
to_time
Ruby on Rails edge
Signature
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 500
def to_time
@to_time_with_timezone ||= getlocal(time_zone)
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 500
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone