Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!caip!cbmvax!bpa!espo From: espo@bpa.UUCP (Bob Esposito) Newsgroups: net.unix-wizards Subject: Daylight/Standard Time Changes Message-ID: <163@bpa.UUCP> Date: Wed, 9-Jul-86 15:37:22 EDT Article-I.D.: bpa.163 Posted: Wed Jul 9 15:37:22 1986 Date-Received: Fri, 11-Jul-86 05:18:28 EDT Organization: Bell of Penna., Phila. Lines: 55 Keywords: new_approach Here's some food for thought. Now that the Pres. signed into law the Daylight Savings Time eff. 1st Sun. April 1987, what are we gonna do ??? Well I devised a new approach to the problem. Just like the old days on UNIX, you had to re-compile the accounting software for holiday changes. Now there's a holiday table that can be edited for the necessary changes. Well I took a similar approach to ctime.c(3c). The only problem (which is a MAJOR one), is that all current programs that utilize ctime() must be re-compiled !!!! Boy what a job that could be. I wonder if anyone else has a better idea ?? Just for completeness, here's the table I designed for ctime(); I call it `dsttab'. I cannot distribute the ctime.c source for obvious reasons. Bob Esposito bpa!espo ------------------------------------------------------------------------- * @ dsttab 1.2 * Daylight/Standard Time table for UNIX localtime(). * * This table is used to get the beginning/ending days * for Daylight Savings Time, on a yearly basis. * Since Congress is so willing to changes these so called * standard times, the UNIX administrator must have a way * to cope with it. * * Table format is really pretty simple. If there is an * entry for the year, it must have the beginning and * ending sundays month-days, separated by some white-space; * e.g. 1974 5 335 * e.g. 1975 58 303 * * These examples show the particulars for 1974 and 1975, * where in 1974 Daylight Savings started on Jan. 6 and * ended on the last sunday in Nov. And in 1975, began * on the last sunday in Feb. and ended on the last sunday * in Oct. * * If there is no year entry, localtime() assumes the standard(?) * time settings; last sunday of April to the last sunday in Oct. * * * year begin end * 1974 5 333 1975 58 303 1986 190 303