Hey, I'm trying to write a simple application with Ruby on Rails that works in my timezone (Prague, UTC + 1). I've set my application.rb like this:
#application.rb config.time_zone = 'Prague' and it seems to be working, for example: > Time.now => 2011-07-26 13:46:06 +0200 #(+0200 because of the daylight saving time) when i try to save the record to the database it workes and stores itself in the UTC timezone (as it's supposed to), however, when I try to load the model from the database, for example: > OpeningHour.first.opening_hour => 2000-01-01 05:00:00 UTC it returns the value in the UTC time zone. Is it supposed to do that? Every time zone tutorial I've stumbled upon so far shows that Rails should convert the value to the local timezone. I'm using mysql2 gem and MySQL 5.5 (x64) on Windows 7. Thanks for any help. Marek -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

