Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1a 12/4/83; site rlgvax.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!eagle!harpo!seismo!rlgvax!guy
From: guy@rlgvax.UUCP (Guy Harris)
Newsgroups: net.unix-wizards,net.bugs.usg
Subject: Re: TZ Rationalization Requested
Message-ID: <1805@rlgvax.UUCP>
Date: Sun, 11-Mar-84 02:46:33 EST
Article-I.D.: rlgvax.1805
Posted: Sun Mar 11 02:46:33 1984
Date-Received: Mon, 12-Mar-84 04:58:41 EST
References: <341@dual.UUCP>, <1795@rlgvax.UUCP> <1084@cbosgd.UUCP>
Organization: CCI Office Systems Group, Reston, VA
Lines: 42

Remember, there is a comment in "ctime.c" that says "This routine does not
work in Saudi Arabia which runs on Solar Time", so the Saudis are screwed by
V6, V7, and USG.

The problem with half-hour time zones could be solved if the "tzset()"
routine were fixed to accept a syntax like

	ZST6:30ZDT

to specify that Zombie Standard Time was 6 hours and 30 minutes off from GMT.
(No offense meant to the people in any such time zone, or to zombies. :-))
And here's the fix (untested, but it looks trivial):

After the line

		timezone = ((long)(n * 60)) * 60;

in "tzset()" in "ctime.c", stick the code:

		if (*p == ':') {
			p++;
			while(*p >= '0' && *p <= '9')
				n = (n * 10) + *p++ - '0';
			if(sign)
				n = -n;
			timezone += n*60;
		}

(This is for the System V "ctime.c", but it's probably the same fix for the
System III "ctime.c".)

Note, BTW, that "timezone" is represented in seconds in USG UNIX; I doubt
that the extra resolution is useful, *but* it saves extra multiplications by
60.  (How to further enhance "tzset" to permit

	WST6:30:05WDT

to specify Wacko Standard Time to be 6 hours, 30 minutes, and 5 seconds off
GMT is left as an exercise for the reader. :-))

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy