cron and DST

Guy Harris guy at auspex.UUCP
Sun Nov 6 07:08:30 AEST 1988


>Our 3B2's running sysVr3.1 ran all the crontab entries twice after
>the change from DST.  I kind of expected that for the entries between
>1 and 2 AM, but the subsequent entries also ran twice.  Is this
>normal?

No.

It's caused by "cron" not understanding how to deal with converting
local time <-> UNIX time and, in particular, how to deal with DST.  I
don't remember the details; it's fixed in SunOS 4.0 (which has a "cron"
based on the S5R3.1 one) by having "cron" use "timelocal" to do the
conversions rather than trying to do them itself.

Unfortunately, S5R3.1 doesn't have "timelocal" (converts a "struct tm"
into a "time_t"); it's from the Arthur Olson time zone code, which SunOS
4.0 uses.  S5R4 will have "mktime", assuming it supports ANSI C, which
pretty much does the same thing.



More information about the Comp.unix.questions mailing list