Hi Daryl, I'm still living in 2.3 land, but one thing I often see is using Time.now vs Time.zone.now
Also, in test_helper (not sure the rails 3.0 equivalent), I needed to set a default Time.zone - otherwise the Time.zone is nil, so Time.zone.now throws exceptions --Keenan On May 3, 2010, at 1:30 AM, Daryl wrote: > Hey there herokuistas, > > So, I'm using Rails 3.0.0.beta3 and am trying to get the default time > in my app to be London while the servers, as you know, are on Pacific > time (I'm in Aus myself). > > I've set the application_controller.rb to have a before filter which > sets the timezone and then sets that to London (I still want AR to > write to the DB in UTC, so have not touched the environment/ > application.rb). > > === > before_filter :set_timezone > > def set_timezone > Time.zone = 'London' > end > === > > Checking heroku console `date` *still* shows the machines on Pacific > time, as does a check of the code when I got there (it should show > Monday but instead stuck on Sunday at the mo). > > Can anyone tell me what I need to do to get the code to see this as > London time ? > > Also, I've asked the fine folks at heroku to reset the daily cron to > go off at 1.15am London time and just wondering if changing this > setting to London time will then affect that daily cron job kicking > off. > > Any help appreciated! A bit stumped here. Thanks ! > Daryl. > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" 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/heroku?hl=en. > -- You received this message because you are subscribed to the Google Groups "Heroku" 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/heroku?hl=en.
