# Backgroundrb and TzTime

**URL:** <https://www.ruby-forum.com/t/backgroundrb-and-tztime/153215>\
**Category:** Rails\
**Created:** [November 13, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/backgroundrb-and-tztime/153215 "2008-11-13T15:15:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@andy](https://www.ruby-forum.com/u/andy)\
**Post date:** [November 13, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/backgroundrb-and-tztime/153215/1 "2008-11-13T15:15:26Z")

</div>

Hello all,

I’m using Backgroundrb on a project that has several time-sensitive  
parameters.

I’m using background.yml to set the schedule for my tasks.

I’m also using the TzTime plugin throughout the web site since users’  
accounts need to be adjusted for their time zones.

I’d like my BackgroundRb tasks to all run at the same time everyday  
(relative to EST). I’ve set the server’s timezone to UTC.

I need the process to run at the same time EST everyday.

In my backgroundrb.yml file, I have start commands such as this:  
:start: \<%= Time.local(Time.now.to\_date.year, Time.now.to\_date.month,  
Time.now.to\_date.day, 1, 15, 0) %\>

The problem with this is that before daylight savings, UTC was 4 hours  
ahead of EST and now it’s 5 hours ahead.

What I’d like to do is adjust for that. I’d love to use TzTime.local  
in my backgroundrb.yml but I’m not exactly sure how to do that. Is  
there a way to include the TzTime plugin in the scheduler so that I  
can call TzTime from the backgroundrb.yml?

Any help is much appreciated.

Thanks,  
Andy
