events don't track DST changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Has anyone else noticed that "at" events in cyrus.conf don't track changes 
in DST (Daylight Saving Time) correctly?  The following event:

   delprune      cmd="/usr/local/cyrus/bin/cyr_expire -E 1 -X 3" at=0100

which was correctly running at 0100 hours is now running at 0200 hours.

The relevant chunk of code is in master/master.c lines 765-777 (v2.3.11):

         /* reschedule as needed */
         b = a->next;
         if (a->period) {
             if(a->periodic) {
                 a->mark = now + a->period;
             } else {
                 /* Daily Event */
                 while(a->mark <= now) {
                         a->mark += a->period;
                 }
             }
             /* reschedule a */
             schedule_event(a);


The "period" for an "at" event is 86400 seconds (1 day).

Does anyone know of a slick way for Cyrus to detect the DST change?  Maybe 
Cyrus should just recompute the "mark" time each time for "at" events 
instead of blindly adding 86400 seconds?

In the meantime, it looks like I can send a HUP signal to master to get it 
to re-read the config and re-initialize the events.

 	Andy
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux