🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #72963

Re: Date bug at year end

#72963
From: Jeffrey M. Vinocur
Date: Mon, 02 Jan 2006 20:42
36 lines
2607 bytes
In article <87sls65x1n.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>John F Morse <xanadu.bbs@invalid.net> writes:
>
>> I guess you could have INN look at the clock for the date and time. I 
>> doubt if it is even worth the trouble.

It is kinda interesting, isn't it, deciding how much effort to
spend in fixing an essentially cosmetic bug that only occurs once
a year.


>syslog has an utterly obnoxious date format, but unfortunately so many
>things parse it that you really can't ever change it.  It doesn't sort,
>it uses English month names, it doesn't have the year... bleh.

Which makes the code in innreport so scary I almost ran away
screaming.  I -think- this:

      # Adjust the year because syslog doesn't record it. We assume that
      # it's the current year unless the last date is in the future.
      my $ld = &ConvDate($last_date);
      $dy-- if $ld > $ts + 60 * ($tm + 60 * ($th + 24 * ($dd - 1 +
        substr("000031059090120151181212243273304334", $dm * 3, 3)))) ||
        $ld < &ConvDate($first_date);

might actually be code to detect this scenario (although I can't
tell for sure because it makes my head hurt), but it seems to
only affect parts of the HTML-ized results and not the news.daily
email.  On the other hand, if it actually does something useful,
I think it might be a big step towards a fix.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID: <dpc38g$tt4$1@puck.litech.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.mbo.net!news.litech.org!not-for-mail
References: <BdLtf.212470$qk4.79698@bgtnsc05-news.ops.worldnet.att.net> <87u0cn270k.fsf@windlord.stanford.edu> <QGcuf.217035$qk4.37653@bgtnsc05-news.ops.worldnet.att.net> <87sls65x1n.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <dpc38g$tt4$1@puck.litech.org>
Subject: Re: Date bug at year end
Date: Mon, 02 Jan 2006 20:42:56 +0000
From: jeff@litech.org (Jeffrey M. Vinocur)
References: <BdLtf.212470$qk4.79698@bgtnsc05-news.ops.worldnet.att.net> <87u0cn270k.fsf@windlord.stanford.edu> <QGcuf.217035$qk4.37653@bgtnsc05-news.ops.worldnet.att.net> <87sls65x1n.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.mbo.net!news.litech.org!not-for-mail
Newsgroups: news.software.nntp
Organization: Litech Systems Design
Lines: 36
Sender: jeff@litech.org
NNTP-Posting-Host: puck.litech.org
X-Trace: puck.litech.org 1136234576 30628 66.218.0.75 (2 Jan 2006 20:42:56 GMT)
X-Complaints-To: usenet@litech.org
NNTP-Posting-Date: Mon, 2 Jan 2006 20:42:56 +0000 (UTC)
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
Originator: jeff@litech.org (Jeffrey M. Vinocur)