[Backgroundrb-devel] TimeZone
Adam Williams
adam at thewilliams.ws
Sat Dec 5 22:04:15 EST 2009
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
> >
> >
>
>
More information about the Backgroundrb-devel
mailing list