[Backgroundrb-devel] UK Daylight Savings

hemant gethemant at gmail.com
Mon Mar 31 13:08:22 EDT 2008


On Mon, Mar 31, 2008 at 6:26 PM, Zachary Powell <zach at plugthegap.co.uk> wrote:
> thanks Thomas,
>
> Mm, I think my first patch was making it fire repeatedly because the time it
> created was in the past. I've improved it (move forwards not back), but
> obviously its still a hack around the issue. not even sure if they're firing
> at the right time (but as they're early morning maintenance scripts 1 hour
> off is no big deal):
>
>     server/cron_trigger.rb#160:
>
>
>       begin
>         s = "#{sec}, #{min}, #{hour}, #{day}, #{month}, #{year}, #{wday},
> #{yday}, #{isdst}, #{zone}"
>         if(day == 32)
>           day = 1
>           month += 1
>           if(month == 13)
>             month = 1
>             year +=1
>           end
>         end
>         s2 = "#{sec}, #{min}, #{hour}, #{day}, #{month}, #{year}, #{wday},
> #{yday}, #{isdst}, #{zone}"
>         puts "changed\n#{s}\n#{s2}" unless s == s2
>         Time.local sec, min, hour, day, month, year, wday, yday, isdst, zone
>       rescue => e
>         raise "failed\n#{s}\n\#{s2}"
>       end
>
> which produced this in the log:
>
>
> changed
> 0, 0, 0, 32, 3, 2008, 1, 91, true, BST
> 0, 0, 0, 1, 4, 2008, 1, 91, true, BST
> changed
> 30, 0, 0, 32, 3, 2008, 1, 91, true, BST
> 30, 0, 0, 1, 4, 2008, 1, 91, true, BST
> changed
> 0, 10, 5, 32, 3, 2008, 1, 91, true, BST
> 0, 10, 5, 1, 4, 2008, 1, 91, true, BST
>  changed
> 0, 20, 5, 32, 3, 2008, 1, 91, true, BST
> 0, 20, 5, 1, 4, 2008, 1, 91, true, BST
> changed
> 30, 20, 0, 32, 3, 2008, 1, 91, true, BST
> 30, 20, 0, 1, 4, 2008, 1, 91, true, BST
> changed
> 0, 0, 0, 32, 3, 2008, 1, 91, true, BST
> 0, 0, 0, 1, 4, 2008, 1, 91, true, BST
> changed
> 0, 50, 2, 32, 3, 2008, 1, 91, true, BST
> 0, 50, 2, 1, 4, 2008, 1, 91, true, BST
>
>
> unfortunately i've got too much going on to look into a proper fix, but i'll
> post one in a few weeks once the busy period has blown over (hopefully this
> will hold out, seems logical..)
>

No problems. I will try to look into this, during weekend and see what
can be done about this.


More information about the Backgroundrb-devel mailing list