Class | Time |
In: |
lib/extlib/time.rb
|
Parent: | Object |
Convert to DateTime (for DateTime/Time conversion protocol).
Time.now.to_datetime #=> #<DateTime: 106046956823/43200,-1/3,2299161>
@return [DateTime] DateTime object representing the same moment as receiver
@api public
# File lib/extlib/time.rb, line 38 38: def to_datetime 39: DateTime.parse self.to_s 40: end