class ActiveSupport::TimeWithZone

Extend ActiveSupport::TimeWithZone with our custom to_s overrides

Public Instance Methods

orig_to_s(format = :default)
Alias for: to_s
to_s(format = :default) click to toggle source

Rails 7 stops overriding to_s (without a format specification) (for performance on Ruby 3.1) cf. activesupport-7.0.4/lib/active_support/core_ext/date/deprecated_conversions.rb We keep overriding this for compatibility

# File lib/ndr_support/date_and_time_extensions.rb, line 87
def to_s(format = :default)
  if format == :default
    Time::DATE_FORMATS.key?(:default) ? to_fs(:default) : orig_to_s
  else
    orig_to_s(format)
  end
end
Also aliased as: orig_to_s