Time.zone.now.to_fs(:symbol)
Time.zone.now.to_formatted_s(:symbol)

pre-Rails 7

Time.zone.now.to_s(:symbol)

date

:symbol

time


:db

:number

 

:time

:short

:long

:long_ordinal

:rfc822

:iso8601


 

This code paraphrases the #to_formatted_s docs.