Forum: Ruby on Rails Help working with timezones

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Richard L. (Guest)
on 2006-04-08 21:04
(Received via mailing list)
I have a number of timezone related issues which I'm currently confused

I want to store all times in the database as UTC/GMT so that I can then
massage them to be displayed how I like at a later date.

I'm using the TZInfo class at the moment to convert timezones and to
deal with daylight savings time.

My main question is how do I ensure all data is stored as UTC when the
server will be located in the US (Dreamhost)? Calling NOW() in SQL will
use the timezone of the server, which isn't UTC - how do I make sure
this does the 'right thing'?

Am I going in the right direction, and how are other people dealing with
this issue?

Thanks in advance.
This topic is locked and can not be replied to.