Q: how to handle switch to daylight savings time in System V.2?
Steve Rudek
stever at tree.UUCP
Thu Apr 13 05:04:52 AEST 1989
What is the proper way to handle daylight savings time under System V?
When the Big Day came and the date command didn't automatically handle the
adjustment and I couldn't find any documentation on how to handle the change
I elected to just reboot the computer and adjust the hardware clock. That got
the "date" command to work okay but created a problem with compiled programs
which use code such as:
time(&Seconds); /*fetch time from system*/
TimeRec=localtime(&Seconds); /*convert it to structure*/
return(TimeRec->tm_yday); /*1..365*/
to determine the day of the year. They now think that 11 pm is the start of
the new day!
The .profile and .cshrc files set the environment variable "TZ" to "PST8PDT".
The PST must stand for 'Pacific Standard Time' and the 8 is apparently the
hour offset from GMT. But what is the PDT for? 'Pacific Daylight Time'?
Where is this documented, anyway? Obviously it is unreasonable to expect AT&T
to properly index their documentation until UNIX is more than 20 years old and
produces more than a billion in annual revenue.
More information about the Comp.unix.questions
mailing list