Issue with Time zones

Hi

I’m having a issue with the time zones in my server I want it to work
with Central Time (US & Canada) and I’ve tried with some ways that i had
found but they don’t really work the way I want. My last attempt was
with this in the environment.rb

config.time_zone = ‘Central Time (US & Canada)’

But when I save a record in the DB it still has the UTC time. I need to
modify something in the gem of mysql or what i need to do?

On 2 December 2011 19:07, art tav [email protected] wrote:

modify something in the gem of mysql or what i need to do?
You should always save stuff in the db in UTC. Convert it to whatever
timezone you want when you display it. If the server is setup in the
zone you want then just use @timestamp.localtime. See
http://corelib.rubyonrails.org/classes/Time.html#M000229

Colin


Posted via http://www.ruby-forum.com/.


You received this message because you are subscribed to the Google G. “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.


gplus.to/clanlaw

Oh I see thank you for your help.