I configured ActiveRecord in my environment.rb file to use UTC as follows:
config.active_record.default_timezone = :utc
I am using MySQL 5.0.x
In a table, called comments, model Comment, there is a field called created_at as :datetime. I basically get two different time shown on the mysql console based on the two following commands:
Comment.create # this will automatically set the time in :created_at Comment.create :created_at => Time.now
The time difference is 3 hours (apparently the difference of my time zone to UTC). If is set :utc conversion off in my environment, everything works fine. I even set the MySQL time conversion tables, but still won't work. Is there a way to set MySQL time zone correctly, and how?
What am I doing wrong? Greetings, Juergen