Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!att-cb!att-ih!occrsh!occrsh.ATT.COM!uokmet.UUCP!root From: root@uokmet.UUCP Newsgroups: comp.unix.questions Subject: Re: What to do for Daylight Savings tim Message-ID: <600016@uokmet.UUCP> Date: 4 Apr 88 18:17:00 GMT References: <329@icus.UUCP> Lines: 26 Nf-ID: #R:icus.UUCP:-32900:uokmet.UUCP:600016:000:758 Nf-From: uokmet.UUCP!root Apr 4 12:17:00 1988 >Unix systems do NOT re-set their clocks when DST starts or ends. What >changes is the _print format_ of timestamps that fall into DST. The >ctime(3C) function uses the TZ variable to see what your timezone is That doesn't work for BSD. There is no such thing as TZ. Instead, localtime() in ctime.c needs the following modification: struct tm * localtime(tim) long *tim; { ... daylbegin = 119; /* last Sun in Apr */ daylend = 303; /* Last Sun in Oct */ if (ct->tm_year==74 || ct->tm_year==75) { daylbegin = daytab[ct->tm_year-74].daylb; daylend = daytab[ct->tm_year-74].dayle; } if (ct->tm_year >= 87) <==== add this daylbegin = 96; <==== add this ... Anything and everything that uses ctime() needs to be recompiled. == kwthomas ==