For some reason when updating a record, updated_at is getting updated as 2011-01-23, even though Date.today is returning 2011-01-22. Why are these different? Is there a way to set them to be the same?
Thanks!
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.
By default, Rails uses UTC as the timezone for all
created_atandupdated_atfields. You can override this by setting a custom timezone inconfig/application.rb:You can run
rake time:zones:allfrom your application directory to get a list of all valid time zones.