Subject: Re: Before I offically call this a time bug can someone else try this?
To: Michael C. Richardson <mcr@sandelman.ottawa.on.ca>
From: Allen Briggs <briggs@canolog.ninthwonder.com>
List: tech-kern
Date: 08/04/1998 18:08:08
I don't know the code in question, so I'm not sure that this is
relevant, but you might want to check and see that you don't want
to make it >= 138 (and reset to yr = 137) since (IIRC), signed 32
bits with the current base maxes out in mid-January, 2038.  In other
words, will your patch be useful if the RT clock shows 1 Feb 2038?

-allen

>   I was thinking about something like this:
> 
> --- clock.c~	Thu Feb 13 07:17:15 1997
> +++ clock.c	Tue Aug  4 08:18:21 1998
> @@ -530,6 +530,14 @@
>  	yr = hexdectodec(rtclk[MC_YEAR]);
>  	yr = (yr < 70) ? yr+100 : yr;
>  
> +	/* is time_t a 4 byte quantity? */
> +	if(sizeof(time_t) <= sizeof(int32_t)) {
> +	  if(yr > 138) {
> +	    printf("WARNING: signed time_t can not cope beyond 2038\n");
> +	    yr = 138;
> +	  }
> +	}
> +
>  	n = sec + 60 * min + 3600 * hr;
>  	n += (dom - 1) * 3600 * 24;