Forum: Ruby on Rails Created_at date/time if off by UTC-5 hours ?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
srj (Guest)
on 2009-01-17 16:40
(Received via mailing list)
Hello -

My model has created_at and updated_at which get set automatically, as
expected, but the time is 5 hours off.  For example, if I create a new
record at 7:15:25 AM the created_at time shows 12:15:25.

I suspect this has to do with my time zone (Eastern Time, United
States).  But if I do a, it shows the correct time.

Does the Timestamp class use a different zone than the Time class?
How can I tell Rails (version 2.2.2, by the way) that my time zone is
Eastern (UTC-5) ?

Or, maybe this is a MySQL issue?  If so, how can I tell MySQL about
the time zone?

Thank you for any help on this,

This topic is locked and can not be replied to.