Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!mit-eddie!uw-beaver!tektronix!cae780!amdcad!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.unix.wizards Subject: Re: Daylight Savings Time Message-ID: <14910@sun.uucp> Date: Thu, 12-Mar-87 03:17:31 EST Article-I.D.: sun.14910 Posted: Thu Mar 12 03:17:31 1987 Date-Received: Fri, 13-Mar-87 20:49:47 EST References: <245@ablnc.ATT.COM> Sender: news@sun.uucp Reply-To: guy@sun.UUCP (Guy Harris) Organization: Sun Microsystems, Mountain View Lines: 38 Keywords: Time ctime(3C) April >I think the code modify of ctime.c and the recompile is a better fix. Still >better is a feature in the future release of UNIX System software >that has an /etc file similar to the /usr/lib/acct/holidays file >that lets the administrator enter in the yearly on and off dates >for daylight savings time. Massively better than that is the code posted to "mod.sources" by Robert Elz, written by Arthur Olson, Robert Elz, and others, that does NOT require the administrator to do ANYTHING unless the rules used to compute the start and stop dates for GMT change. Schemes that require the administrator to change something every year, to put it bluntly, suck; why force the *administrator* to do work that the *machine* can properly do? (For that matter, "/usr/lib/acct/holidays" isn't as good as it could be; it requires you to enter day-of-year for holidays, and that's *another* thing the machine should be computing given month and day values.) Olson's scheme also will permit "ctime" and company to properly convert times not in the current year - something which UNIX has been able to do up to now, at least for times in the past, and which schemes that *only* tell the system what the rules are for the *current* year will *not* permit UNIX to be able to do. Remember, "not in the current year" does not necessarily mean "a long time ago". Times "not in the current year" may be times that are less than 6 months ago; "ls" will print times as well as dates for dates/times less than 6 months in the past. Since this stuff was posted to mod.sources, people with source should replace "ctime.c" with the code there; then, once they've recompiled all the programs that use "ctime", "localtime", and company, they won't have to change them again in the future. >As for BSD, it may not even be an issue... It's an issue. It uses the same scheme that other UNIXes use; the only difference is that it gets the offset from GMT, and a code indicating which of the compiled-in rules it should use, from the kernel. It doesn't get the rules from the kernel.