Daylight/Standard Time Changes

Bob Esposito espo at bpa.UUCP
Thu Jul 10 05:37:22 AEST 1986


	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 <space/tab> 5 <space/tab> 335
* e.g. 1975 <space/tab> 58 <space/tab> 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



More information about the Comp.unix.wizards mailing list