UTC for everything, always. Localize the time in rails on the front-
end, but always store and compare in UTC on the back-end.
Trust me, it will make your life a lot easier.

On Oct 25, 9:52 am, Tom Allison <[email protected]> wrote:
> Just realized I have a nice problem.
>
> using Postgresql...
>
> When I save something via Rails to the table it's saved with a GMT
> offset (so 12:00 becomes 16:00)
> But the database is configured to save everything as GMT.
>
> Which means -- when I query it via SQL it's coming back as now + 4
> hours instead of just plain now.
>
> Where/How do I get this back in sync?

-- 
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.

Reply via email to