Hi, Whats the default time zone for the worker classes.? How to change the time zone for the wroker classes? Regards, Raghu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20091203/a0aaffeb/attachment.html>
It''s the same as that defined in your Rails environment.rb: config.time_zone = ''Eastern Time (US & Canada)'' Or, if that is commented out, it is obtained from the system. I believe :) Adam Williams On Dec 3, 2009, at 3:48 AM, raghavendra gada wrote:> Hi, > > Whats the default time zone for the worker classes.? > How to change the time zone for the wroker classes? > > Regards, > Raghu > _______________________________________________ > Backgroundrb-devel mailing list > Backgroundrb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/backgroundrb-devel
Hi Adam, I am using the UTC based time in the rails environment config.time_zone = ''utc''. And only for the Worker environment i want to specify the PST time zone. Regards, Raghu On Thu, Dec 3, 2009 at 7:01 PM, Adam Williams <adam at thewilliams.ws> wrote:> It''s the same as that defined in your Rails environment.rb: > > config.time_zone = ''Eastern Time (US & Canada)'' > > Or, if that is commented out, it is obtained from the system. > > I believe :) > > Adam Williams > > > On Dec 3, 2009, at 3:48 AM, raghavendra gada wrote: > > > Hi, > > > > Whats the default time zone for the worker classes.? > > How to change the time zone for the wroker classes? > > > > Regards, > > Raghu > > _______________________________________________ > > Backgroundrb-devel mailing list > > Backgroundrb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20091203/62a67090/attachment-0001.html>
Ah, in that case, you can use: Time.use_zone(''Pacific Time (US & Canada)'') do ...work... end Or, you can have a different environment, like environments/backgroundrb.rb, which is a copy of environments/production.rb, except that you: config.time_zone = ''Pacific Time (US & Canada)'' Of course, whatever you start backgroundrb with, you''ll need to ensure that you use that environment. Could be problematic if you have other code that checks Rails.env.production?. HTH, Adam Williams On Dec 3, 2009, at 8:46 AM, raghavendra gada wrote:> Hi Adam, > > I am using the UTC based time in the rails environment > config.time_zone = ''utc''. > > And only for the Worker environment i want to specify the PST time zone. > > Regards, > Raghu > > On Thu, Dec 3, 2009 at 7:01 PM, Adam Williams <adam at thewilliams.ws> wrote: > It''s the same as that defined in your Rails environment.rb: > > config.time_zone = ''Eastern Time (US & Canada)'' > > Or, if that is commented out, it is obtained from the system. > > I believe :) > > Adam Williams > > > On Dec 3, 2009, at 3:48 AM, raghavendra gada wrote: > > > Hi, > > > > Whats the default time zone for the worker classes.? > > How to change the time zone for the wroker classes? > > > > Regards, > > Raghu > > _______________________________________________ > > Backgroundrb-devel mailing list > > Backgroundrb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > >
Hi Adam, Does plugin automatically checks for the environment/backgroundrb.rb or we need to make changes. Regards, Raghu On Thu, Dec 3, 2009 at 7:57 PM, Adam Williams <adam at thewilliams.ws> wrote:> Ah, in that case, you can use: > > Time.use_zone(''Pacific Time (US & Canada)'') do > ...work... > end > > Or, you can have a different environment, like > environments/backgroundrb.rb, which is a copy of environments/production.rb, > except that you: > > config.time_zone = ''Pacific Time (US & Canada)'' > > Of course, whatever you start backgroundrb with, you''ll need to ensure that > you use that environment. Could be problematic if you have other code that > checks Rails.env.production?. > > HTH, > > Adam Williams > > On Dec 3, 2009, at 8:46 AM, raghavendra gada wrote: > > > Hi Adam, > > > > I am using the UTC based time in the rails environment > > config.time_zone = ''utc''. > > > > And only for the Worker environment i want to specify the PST time zone. > > > > Regards, > > Raghu > > > > On Thu, Dec 3, 2009 at 7:01 PM, Adam Williams <adam at thewilliams.ws> > wrote: > > It''s the same as that defined in your Rails environment.rb: > > > > config.time_zone = ''Eastern Time (US & Canada)'' > > > > Or, if that is commented out, it is obtained from the system. > > > > I believe :) > > > > Adam Williams > > > > > > On Dec 3, 2009, at 3:48 AM, raghavendra gada wrote: > > > > > Hi, > > > > > > Whats the default time zone for the worker classes.? > > > How to change the time zone for the wroker classes? > > > > > > Regards, > > > Raghu > > > _______________________________________________ > > > Backgroundrb-devel mailing list > > > Backgroundrb-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20091204/5ce4ed95/attachment.html>
I believe that when you start the script, you need to configure the shell environment to have RAILS_ENV equal ''backgroundrb''. Again, I don''t know what the implications of doing that will be, so caveat emptor! On Dec 4, 2009, at 12:01 AM, raghavendra gada wrote:> > Hi Adam, > > Does plugin automatically checks for the environment/backgroundrb.rb or > we need to make changes. > > Regards, > Raghu > > On Thu, Dec 3, 2009 at 7:57 PM, Adam Williams <adam at thewilliams.ws> wrote: > Ah, in that case, you can use: > > Time.use_zone(''Pacific Time (US & Canada)'') do > ...work... > end > > Or, you can have a different environment, like environments/backgroundrb.rb, which is a copy of environments/production.rb, except that you: > > config.time_zone = ''Pacific Time (US & Canada)'' > > Of course, whatever you start backgroundrb with, you''ll need to ensure that you use that environment. Could be problematic if you have other code that checks Rails.env.production?. > > HTH, > > Adam Williams > > On Dec 3, 2009, at 8:46 AM, raghavendra gada wrote: > > > Hi Adam, > > > > I am using the UTC based time in the rails environment > > config.time_zone = ''utc''. > > > > And only for the Worker environment i want to specify the PST time zone. > > > > Regards, > > Raghu > > > > On Thu, Dec 3, 2009 at 7:01 PM, Adam Williams <adam at thewilliams.ws> wrote: > > It''s the same as that defined in your Rails environment.rb: > > > > config.time_zone = ''Eastern Time (US & Canada)'' > > > > Or, if that is commented out, it is obtained from the system. > > > > I believe :) > > > > Adam Williams > > > > > > On Dec 3, 2009, at 3:48 AM, raghavendra gada wrote: > > > > > Hi, > > > > > > Whats the default time zone for the worker classes.? > > > How to change the time zone for the wroker classes? > > > > > > Regards, > > > Raghu > > > _______________________________________________ > > > Backgroundrb-devel mailing list > > > Backgroundrb-devel at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/backgroundrb-devel > > > > > >