Time Zone FIX info

Michael M Levin levin at magnus.Hotline.Com
Sun Feb 4 20:21:19 AEST 1990


Having seen several articles float by lately on the subject of the 3B1's
'native' time zone, I thought it appropriate to (once again) post the
following info.

The 3B1's 'native' time zone is EST5EDT.  This is NOT a function of the TZ
file alone, but also contained within the 'kernal'.  When a shell is started
up, the TZ file is read, and the environment uses the value in the TZ file
(if it exists) to determine the time zone.  If, on the other hand, the
file does NOT exist, or in the event that a non-shell process is started
directly from a login (such as is the case with uucp, news, etc), there
is nothing in the start-up procedure to read in the TZ file.  Hence, the
'native' time zone (which is ONLY correct for those folks in the East) is
what's used.  This is a not a function of the kernel per se, but rather
another file which is an integral _part_ of the basic system, namely
/lib/shlib.  

The following excerpt hex-dump of the shlib file will show what I mean:

                ## ##
00000400: 00 00 46 50  00 30 00 0c  00 30 00 10  50 53 54 00   ..p..0...0..EST.
00000410: 50 44 54 00  00 00 00 00  00 00 00 00  00 00 00 00   EDT.............

The numbers under the ## ## are the hexadecimal value of the number of seconds
west of Greenwich correspond to the given time zones.  ALL 3B1 distribution
is in EST EDT form, and the numeric value is 46 50.  By simply modifying the
numbers, as well as the letters, as appropriate, you can make YOUR 3B1's
native time zone be YOUR time zone.  That way, when a uucico is started, even
though the TZ file isn't going to be read, your time zone will be correct.
Here are the values for the US time zones:

      English name      # secs         UNIX name
     --------------    --------       -----------
	Pacific:	70 80		PST PDT
	Mountain:	62 70		MST MDT
	Central:	54 60		CST CDT
	Eastern:	46 50		EST EDT

I had, at one time, written a little program to do this.  I don't know what
happenned to it.  I based it on a similiar situation (also within shlib)
involving the changeover from normal to daylight savings time which had
been written by Lenny Tropiano.  Lenny, I don't know if it's worth re-writing
something to do this automatically, or simply having folks use bpatch to
correct it manually.


				Happy hacking!



				Mike Levin
-- 
 _            _           
| | ___  ___ |_| ___   Michael Levin     SilentRadio Headquarters- Los Angeles
| |/ ._\| | || ||   \  20732 Lassen Street,    Chatsworth  CA  91311    U.S.A.
|_|\___/ \_/ |_||_|_|  E-Mail: levin at Hotline.Com  {att|csun|srhqla}!magnus!mml



More information about the Unix-pc.general mailing list