
Thanks to Mark Brader, {lsuc,sq}!msb, for the DST changes.
*** ctime.c.old	Thu Mar  6 19:58:52 1986
--- ctime.c	Sat Feb  7 21:13:55 1987
***************
*** 1,4
! #define	USA
  /*
  #define	Australia
  */

--- 1,4 -----
! #define	NorthAm	/* North America */
  /*
  #define	USA
  #define	Australia
***************
*** 1,5
  #define	USA
  /*
  #define	Australia
  */
  

--- 1,6 -----
  #define	NorthAm	/* North America */
  /*
+ #define	USA
  #define	Australia
  */
  
***************
*** 26,31
   *
   * The routine calls the system to determine the local
   * timezone and whether Daylight Saving Time is permitted locally.
  #ifdef	USA
   * (DST is then determined by the current US standard rules)
   * There is a table that accounts for the peculiarities

--- 27,34 -----
   *
   * The routine calls the system to determine the local
   * timezone and whether Daylight Saving Time is permitted locally.
+ #ifdef	NorthAm
+  * (DST is then determined by the current US and Canadian standard rules)
  #ifdef	USA
   * There is a table that accounts for the peculiarities
   * undergone by daylight time in 1974-1975.
***************
*** 27,33
   * The routine calls the system to determine the local
   * timezone and whether Daylight Saving Time is permitted locally.
  #ifdef	USA
-  * (DST is then determined by the current US standard rules)
   * There is a table that accounts for the peculiarities
   * undergone by daylight time in 1974-1975.
  #endif

--- 30,35 -----
  #ifdef	NorthAm
   * (DST is then determined by the current US and Canadian standard rules)
  #ifdef	USA
   * There is a table that accounts for the peculiarities
   * undergone by daylight time in 1974-1975.
  #endif
***************
*** 31,36
   * There is a table that accounts for the peculiarities
   * undergone by daylight time in 1974-1975.
  #endif
  #ifdef	Australia
   * (DST is then determined according to the Summer Time Act 1973 (Vic))
  #endif

--- 33,39 -----
   * There is a table that accounts for the peculiarities
   * undergone by daylight time in 1974-1975.
  #endif
+ #endif
  #ifdef	Australia
   * (DST is then determined according to the Summer Time Act 1973 (Vic))
  #endif
***************
*** 61,67
  #define	DS_GAP	1	/* DS time difference is 1 hour */
  
  #endif
! #ifdef	USA
  	/*
  	 * daylight saving rules (copied from Bell original)
  	 */

--- 64,70 -----
  #define	DS_GAP	1	/* DS time difference is 1 hour */
  
  #endif
! #ifdef	NorthAm
  	/*
  	 * daylight saving rules (copied from Bell original)
  	 */
***************
*** 66,72
  	 * daylight saving rules (copied from Bell original)
  	 */
  #define	HEMI	&&	/* northern hemisphere */
! #define	DS_BEGIN 119	/* last possible start for DS, (last day in Apr) */
  #define	DS_END	303	/* last possible end day for DS, (last day in Oct) */
  #define	HOUR_ON	2	/* 2am - 3am is lost when DS starts */
  #define	HOUR_OFF 1	/* 1am - 2am runs twice when DS ends (??) */

--- 69,77 -----
  	 * daylight saving rules (copied from Bell original)
  	 */
  #define	HEMI	&&	/* northern hemisphere */
! #define	DS_BEGIN 119	/* old last possible start for DS, (last day in Apr) */
! #define	DS_NBEGIN 96	/* new last possible start for DS, (Apr 7) */
! 			/* (new rule begins in 1987) */
  #define	DS_END	303	/* last possible end day for DS, (last day in Oct) */
  #define	HOUR_ON	2	/* 2am - 3am is lost when DS starts */
  #define	HOUR_OFF 1	/* 1am - 2am runs twice when DS ends (??) */
***************
*** 140,145
  	dayno = ct->tm_yday;
  	daylbegin = DS_BEGIN;
  	daylend = DS_END;
  #ifdef	USA
  	if (ct->tm_year==74 || ct->tm_year==75) {
  		daylbegin = daytab[ct->tm_year-74].daylb;

--- 145,152 -----
  	dayno = ct->tm_yday;
  	daylbegin = DS_BEGIN;
  	daylend = DS_END;
+ #ifdef	NorthAm
+ 	if (ct->tm_year >= 87) daylbegin = DS_NBEGIN;
  #ifdef	USA
  	else if (ct->tm_year<=75 && ct->tm_year>=74) {
  		daylbegin = daytab[ct->tm_year-74].daylb;
***************
*** 141,147
  	daylbegin = DS_BEGIN;
  	daylend = DS_END;
  #ifdef	USA
! 	if (ct->tm_year==74 || ct->tm_year==75) {
  		daylbegin = daytab[ct->tm_year-74].daylb;
  		daylend = daytab[ct->tm_year-74].dayle;
  	}

--- 148,154 -----
  #ifdef	NorthAm
  	if (ct->tm_year >= 87) daylbegin = DS_NBEGIN;
  #ifdef	USA
! 	else if (ct->tm_year<=75 && ct->tm_year>=74) {
  		daylbegin = daytab[ct->tm_year-74].daylb;
  		daylend = daytab[ct->tm_year-74].dayle;
  	}
***************
*** 145,150
  		daylbegin = daytab[ct->tm_year-74].daylb;
  		daylend = daytab[ct->tm_year-74].dayle;
  	}
  #endif
  	daylbegin = sunday(ct, daylbegin);
  	daylend = sunday(ct, daylend);

--- 152,158 -----
  		daylbegin = daytab[ct->tm_year-74].daylb;
  		daylend = daytab[ct->tm_year-74].dayle;
  	}
+ #endif
  #endif
  	daylbegin = sunday(ct, daylbegin);
  	daylend = sunday(ct, daylend);

