home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!munnari.oz.au!spool.mu.edu!sdd.hp.com!swrinde!zaphod.mps.ohio-state.edu!howland.reston.ans.net!europa.asd.contel.com!gatech!usenet.ins.cwru.edu!news.ysu.edu!psuvm!auvm!CUNYVM.BITNET!NMBCU
- Message-ID: <NETNWS-L%93010418495654@VM1.NODAK.EDU>
- Newsgroups: bit.listserv.netnws-l
- Date: Mon, 4 Jan 1993 19:45:35 EST
- Sender: NETNWS-L Netnews List <NETNWS-L@NDSUVM1.BITNET>
- From: Nelson Broat <NMBCU@CUNYVM.BITNET>
- Subject: Re: Something wrong with the days calculation?
- In-Reply-To: Message of Mon, 4 Jan 1993 17:04:38 EST from <LRL@psuvm.psu.edu>
- Lines: 62
-
- Here's a partial trace, and below that, the code within "CheckHeaders" where
- the bug (sortof) occurs. A possible temporary fix is at the bottom.
-
- 11:47:38 Process article for group(s) rec.video.satellite
- Date = Tue, 22 Dec 1992 18:39:03 CST
- art.postdate = ARTPOSTDATE
- art.jul_postdate = 92358
- art.posttime = 0039
- bad_date = 0
- g.today = 93004
- g.reject_old = 14
- 11:47:38 Foreign article rejected: Article is too old; date=12/23/92
-
-
- 'FIND Date:'
- if rc ^= 0 then return '"Date:" header is required.'
- 'EXTRACT /CURLINE'
- parse var curline.3 . date
- Say 'Date = 'date
- parse value ParseDateTime(date) with ,
- art.postdate art.jul_postdate art.posttime bad_date .
- if bad_date & b.local then
- return 'Date given is invalid or in invalid format.'
- if g.today - art.jul_postdate > g.reject_old then
- Do; /*NMB*/
- Say 'art.postdate = 'artpostdate /*NMB*/
- Say 'art.jul_postdate = 'art.jul_postdate /*NMB*/
- Say 'art.posttime = 'art.posttime /*NMB*/
- Say 'bad_date = 'bad_date /*NMB*/
- Say 'g.today = ' g.today /*NMB*/
- Say 'g.reject_old = 'g.reject_old /*NMB*/
- return 'Article is too old; date='art.postdate
- End; /*NMB*/
-
- Since todays julian date will be 93xxx and anything posted last year
- but arriving this year, say 12/22/92 - 12/31/92, will have a julian date
- of 92yyy, the reject date will always be incredibly larger than the default
- value for "reject_old" which is 14. As a fix, if you set it too large then
- you run the risk of accepting these so called old articles, on the other hand
- if you set it too small then you run the risk of missing a chance to
- load these articles on your system, since in reality, articles posted
- between 12/22 and 12/31 probably really aren't old; i.e. - they never
- made it onto your system this holiday season for whatever reason.
-
- We've decided to change the above If statement to...
-
- If g.today - art.jul-postdate > 14 & g.today - art.jul_postdate < 635 Then...
- Return 'Article is too old; date' = art.postdate
-
- I'd be interested in hearing what others think of this solution?
-
- Its 635 because 1000-366 (number of days in the leap year) = 634. Thus,
- any article with a posting date of 12/31 or earlier will get accepted
- and not rejected. This of course, becomes a problem should the fix be left in
- too long and truly old articles do decide to make a comeback. :)
-
- All in all this sounds like a problem which will weed itself out "reject_old"
- number of the days into the new year; I.E. - I'll be removing the fix on the
- 15th. But next year we go through this all over again. :-) Anyone have a
- permanent solution?
-
- Nelson
-