How do you format Rails timestamps in a more human-readable format? If I simply print out created_at or updated_at in my view like this:
<% @created = scenario.created_at %>
Then I will get:
2009-03-27 23:53:38 UTC
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
strftime(from Ruby’s Time) andto_formatted_s(from Rails’ ActiveSupport) functions should be able to handle all of your time-formatting needs.