Timezone or Time conflict
I deployed a Rails App but I'm getting the times wrong on the created_at columns.
I go to rails console production and ran Time.now and I get the correct time.
I logged in to MySQL and ran SELECT NOW(); and I get the correct time.
But when a new record is created into the database I get that it's about 5am when it's really about 1am.
Anybody experience anything similar? How did you fix it?
1 Reply
(Typically, the best approach to handling time is to store it in UTC, and convert to/from local time as close to the human as possible.)