Xref: utzoo comp.unix.questions:12834 comp.unix.microport:3143 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pacbell!sactoh0!tree!stever From: stever@tree.UUCP (Steve Rudek) Newsgroups: comp.unix.questions,comp.unix.microport Subject: Q: how to handle switch to daylight savings time in System V.2? Keywords: date, TZ=, Microport_System_V/AT Message-ID: <265@tree.UUCP> Date: 12 Apr 89 19:04:52 GMT Organization: TREE BBS (916)-349-0385 Sacramento, Ca Lines: 18 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.