Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mimsy!aplcen!jhunix!mwh From: mwh@jhunix.UUCP Newsgroups: comp.sys.att,comp.unix.questions Subject: Re: Daylight Savings Time and my 3b2 Message-ID: <4647@jhunix.UUCP> Date: Mon, 6-Apr-87 08:08:40 EST Article-I.D.: jhunix.4647 Posted: Mon Apr 6 08:08:40 1987 Date-Received: Wed, 8-Apr-87 04:31:46 EST References: <4646@jhunix.UUCP> Reply-To: mwh@jhunix.UUCP (Michael Hrybyk) Organization: Johns Hopkins Univ. Computing Ctr. Lines: 47 Keywords: Daylight Savings Time Xref: utgpu comp.sys.att:283 comp.unix.questions:1634 In article <4646@jhunix.UUCP> msc_wers@jhunix.UUCP (Edward R Scheinerman) writes: >My computer (an AT&T 3b2) >doesn't know that we've changed the weekend >for the Standard/Daylight time. How can I convince it >we are now in EDT and not EST? > Since this applies to all vanilla System V implementations, I'll respond here. SysV sets timezone by looking at the TZ environment variable. The format of the variable is <3letter timezone name><3 letter timezone name> The first timezone stands for "standard" time, the second for "daylight savings" time. So the normal commands in /etc/profile to set TZ should be TZ=EST5EDT export TZ The operating system only knows about 1 time format - seconds from 1969 in the GMT zone. Various library routines (see ctime(3)), NOT the kernel, adjust the zone by the value of TZ to give you the corrected time (e.g., the output of the date command). These routines assume that from the last weekend in April to the last in October each year that the time should be adjusted, and the second timezone in the TZ variable be used as a label. Unfortunately, the feds changed this recently, creating a slight problem with wiring in DST changes. To get around this, one must set TZ to the following now TZ=EDT4 export TZ and change it back to normal on the last weekend in April, as follows TZ=EST5EDT export TZ These commands should be put in /etc/profile, or something that is sourced from that script, such as /etc/TIMEZONE. mwh