Ruby::V4::DateTime
Inherits Ruby::V4::Date < Comparable < Reference < Object
Constructors
Instance methods
Returns an unambiguous and information-rich string representation of this object, typically intended for developers.
This method should usually not be overridden. It delegates to
#inspect(IO) which can be overridden for custom implementations.
Also see #to_s.
Смена зоны с сохранением момента: стенное время сдвигается на разницу офсетов (новый − старый).
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.
Тот же момент в зоне с собственным офсетом даты-времени (Ruby >= 2.5: DateTime#to_time сохраняет офсет).