Any key inTime::DATE_FORMATS can be used. See
active_support/core_ext/time/conversions.rb.
# File activesupport/lib/active_support/time_with_zone.rb, line 241
def to_formatted_s(format = :default)
if format == :db
utc.to_formatted_s(format)
elsif formatter = ::Time::DATE_FORMATS[format]
formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter)
else
# Change to to_s when deprecation is gone.
"#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}"
end
end