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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D9e51e2cc1f5ab74d3c9cd56a53b6a10?d=identicon&s=25 srj (Guest)
on 2009-01-17 15: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 Time.now, 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,

Steve
This topic is locked and can not be replied to.