[Info-vax] Significance of 2020 / 2021 date
1tim....@gmail.com
1tim.lovern at gmail.com
Sat Jan 9 16:38:07 EST 2021
On Thursday, January 7, 2021 at 2:00:26 PM UTC-7, issinoho wrote:
> On Thursday, 7 January 2021 at 20:48:52 UTC, abrsvc wrote:
> > On Thursday, 7 January 2021 at 15:38:19 UTC-5, 1tim.... at gmail.com wrote:
> > > On Thursday, January 7, 2021 at 11:52:35 AM UTC-7, Stephen Hoffman wrote:
> > > > On 2021-01-07 18:40:56 +0000, Hein RMS van den Heuvel said:
> > > >
> > > > > On Thursday, January 7, 2021 at 12:33:57 PM UTC-5, Andy Burns wrote:
> > > > >> issinoho wrote:
> > > > >>
> > > > >>> We have some old 90s VAX C code which rejects any dates after the year 2020
> > > > >> Does this use 2 digit years or 4 digit?
> > > > >>
> > Without seeing any of the code, we can speculate till the cows come home and never uncover the real problem. I too have seen all kinds of trickery to get around 2 digit year storage and the change from 19 to 20. Given that the century remained the same here, I suspect a different issue.
> >
> > There are many of us here (myself included) that can provide assistance in tracking this down. Just because the code is old does not mean anything. I am working with code now that was last modified in 1988 and is still running fine. Other code written recently has issues (go figure...)
> >
> > Dan
> OK, so the very fact none of you are jumping down my throat with an obvious reason is significant.
>
> For the curious here is the code in question...
>
> if (atoi (date_string + 5) > 2020)
> ....
>
> where date_string is a char array
>
> Thanks for the continued support.
you are adding 5 to the ascii value of the first byte of that date string.
code should read
if ((atoi(date_string) + 5) > 2020)
More information about the Info-vax
mailing list