From:	MERC::"uunet!VM1.NoDak.EDU!ANU-NEWS" 30-JUN-1992 15:21:54.51
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@VM1.NoDak.EDU>
CC:	
Subj:	Re: NNTP client doesn't get postmarks

In article <1992Jun30.161648.10511@julian.uwo.ca>, reggers@julian.uwo.ca (Reg Qu
inton) writes:
> In article <1992Jun30.145701.4362@julian.uwo.ca>,
>       reggers@julian.uwo.ca (Reg Quinton) writes:
> |> Under 6.1a4 in NNTP client mode we're seeing problems getting Date lines
> |> from our Unix server
> |>
> |> Has anyone got a fix for this one?
>
> Found and fixed the problem -- in newsrtl.c the routine that parses dates
> assumes the year field is '92' and not '1992'. This patch fixes it:
>
> vax: diff newsrtl.c
> ************
> File UWO:[NEWS_V61.NEWS_SRC]NEWSRTL.C;44
>   544       if (yr < 100 ) yr += 1900;
>   545       }
> ******
> File UWO:[NEWS_V61.NEWS_SRC]NEWSRTL.C;39
>   544       yr += 1900;
>   545       }
> ************

        Actually to be correct after the year 1999 the code should read:

  if (isdigit(*s)) {
    sscanf(s,"%d %s %d %d:%d:%d",&dom,mon,&yr,&hr,&mn,&sc);
    if (yr < 70) yr += 2000;
    if (yr < 100) yr += 1900;
    }

        This way the code will be good up until the year 2070 instead of dying
on January 1, 2000.  The year 1970 was picked due to it being the beginning
date for unix.


-Earle
_____________________________________________________________________________
             ____ ____    ___
Earle Ake   /___ /___/ / /     Science Applications International Corporation
           ____//   / / /__                 Dayton, Ohio
-----------------------------------------------------------------------------
Internet: ake@dayton.saic.com  uucp: dayvb!ake  NSI-DECnet (SPAN): 28284::ake
