Daily ArchiveThursday, July 28th, 2005
Uncategorized 28 Jul 2005 07:51 am
Formatting a timestamp
For some reason I’ve had to look this up twice recently and found it hard to find, so I’ll add it here. If you want to get a reasonable, human-readable version of a timestamp, here’s probably what you want:
obj.created_at.to_formatted_s(:db)
ActiveSupport::Date::Conversions