Timezones in Rails
Are a bit of a mess. If you want an easy life assume that your app is only going to be ever run in one timezone and go to environment.rb and set: ENV['TZ'] = 'GMT' <div>
</div><div>The problem I had is that it seems rails is doing a cast of the date. I set a date as GMT, put into the database, a timestamp with time zone field. Then when you get it out it casts into my local timezone: </div>
>> sa = Thingy.new >> sa.datepoint = Time.gm(2006,12,13) => Wed Dec 13 00:00:00 UTC 2006 >> sa.save .. >> zz = Thingy.find(:all)[1] >> zz.datepoint => Wed Dec 13 00:00:00 PST 2006
On a light note, got Plone 3.0 up and running and made a first completely useless check-in on it. Yay.