Forum: Ruby on Rails Activerecord time problem

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.
39f714d21ec9593a754084ca8bc8c834?d=identicon&s=25 Antti Akonniemi (Guest)
on 2007-07-05 04:59
Hi,

I have a strange problem in my hands. My application works correctly for
a while (I don't know actual time but it is hours), but then suddenly
created_at/updated_at timestamps are stored in UTC and not in the
correct timezone (server is in that timezone, mysql gives correct time,
environment.rb has the correct timezone).

Any ideas what is causing this? And more importantly - how to fix this?
I don't want to be restarting my server every now and then because of
this :)

rails 1.2.2
mysql 5.0.32


-antti
39f714d21ec9593a754084ca8bc8c834?d=identicon&s=25 Antti Akonniemi (Guest)
on 2007-07-05 10:22
Antti Akonniemi wrote:
> Hi,
>
> I have a strange problem in my hands. My application works correctly for
> a while (I don't know actual time but it is hours), but then suddenly
> created_at/updated_at timestamps are stored in UTC and not in the
> correct timezone (server is in that timezone, mysql gives correct time,
> environment.rb has the correct timezone).
>
> Any ideas what is causing this? And more importantly - how to fix this?
> I don't want to be restarting my server every now and then because of
> this :)
>
> rails 1.2.2
> mysql 5.0.32

I should add that this concerns only ActiveRecord - otherwise current
time is shown correctly.

-antti
This topic is locked and can not be replied to.