events don't track DST changes

Andrew Morgan morgan at orst.edu
Wed Apr 16 20:37:21 EDT 2008


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


More information about the Info-cyrus mailing list