Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.unix.wizards Subject: Re: More DST tinkering Message-ID: <15590@sun.uucp> Date: Wed, 25-Mar-87 02:57:03 EST Article-I.D.: sun.15590 Posted: Wed Mar 25 02:57:03 1987 Date-Received: Fri, 27-Mar-87 00:46:19 EST References: <8784@decwrl.DEC.COM> Sender: news@sun.uucp Lines: 40 Keywords: daylight time, elections Summary: Yes, Olson's does > That's right, in presidential election years, daylight time would be > extended by two weeks in the Pacific time zone only. (No word on what happens > in Hawaii.) > > Do any of the recent proposals for parameter driven time conversion deal > with this class of tinkering? From the "pacificnew" file in the Arthur Olson timezone code, as posted to net.sources: # @(#)pacificnew 3.1 # "Pacific Presidential Election Time" has been contemplated by the US Congress # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Twilite 1987 max - Apr Sun>=1 2:00 1:00 D Rule Twilite 1987 max uspres Oct lastSun 2:00 1:00 PE Rule Twilite 1987 max uspres Nov Sun>=7 2:00 0 S Rule Twilite 1987 max nonpres Oct lastSun 2:00 0 S # Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL] Zone US/Pacific-New -8:00 US P%sT 1987 -8:00 Twilite P%sT The types "uspres" and "nonpres" are hardcoded into the time zone file compiler for efficiency, but other types are supported; the compiler calls "system" with the command yearistype where is the year number and is the type string. If "yearistype" exits with an exit code of 0 (i.e., normal UNIX "true"), the year is considered to be of that type; otherwise, if it exits with an exit code of 1, the year is considered not to be of that type; otherwise, "yearistype" is assumed to be badly confused and the compiler quits after printing an error. This is done when the tables are built; the tables are just lists of transition times, so the only overhead this feature causes is whatever overhead is caused by the increase in table size.