Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!nbires!vianet!devine From: devine@vianet.UUCP (Bob Devine) Newsgroups: comp.unix.wizards Subject: Re: Daylight Savings Time: how to fix ctime.c Message-ID: <161@vianet.UUCP> Date: Wed, 18-Mar-87 21:35:52 EST Article-I.D.: vianet.161 Posted: Wed Mar 18 21:35:52 1987 Date-Received: Fri, 20-Mar-87 04:39:05 EST References: <4992@brl-adm.ARPA> Organization: Western Digital, Boulder Tech Ctr Lines: 26 In article <4992@brl-adm.ARPA>, Makey@LOGICON.arpa (Jeff Makey) writes: > Those of you with UNIX source who plan to fix your ctime routine so it > knows about the 1987+ daylight savings time rules should be interested > in the following information about daylight time in the United States. A better way exists. Hardcoding a change into the "ctime" library is painful (tracking down and changing the affected programs is no fun) and the changes never stop. There have been proposals for changes in the Daylight Saving Time rules for Presidential election years in the US and individual states may change the rules locally. Check mod.sources archives for a file-based public-domain version of how to deal with timezones and seasonal time changes for many countries (original author is Arthur Olson; reachable at elsie!ado). Bob Devine > before 1967 no daylight time at all > 1967 -> 1973 last Sunday in April -> last Sunday in October > 1974 first Sunday in January -> last Sunday in October > 1975 last Sunday in February -> last Sunday in October > 1976 -> 1986 last Sunday in April -> last Sunday in October > beginning 1987 first Sunday in April -> last Sunday in October The "before 1967" rule is plainly wrong. Also, each of the above rules has major exceptions!