🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #28350

Re: slrn local spool "newgroups" timezone problem(?)

#28350
From: Olly Betts
Date: Thu, 12 Dec 1996 00:00
34 lines
1895 bytes
[Sorry about the slow reply -- I've been too busy recently to read much
news.  Thanks to John Davis for bringing this post to my attention]

In article <slrn5a5fob.11f.gallto@amy.apana.org.au>, Tony Galliford wrote:
>I've just compiled slrn for local spool support [...]
>New newsgroups are being repeadedly
>marked as "new", even after they've been subscribed and read,
>but only for about 20 hours, after which they revert to normal.
>
>I dug through the code in spool.c, and noticed what appears to
>be a logical error in the timezone correction.  [...]
>the time is adjusted in the wrong direction by the
>mktime function (in the line removed in the patch below).
>
>Anyway, this patch fixes the problem for me.  Can anyone see
>anything wrong with this?  I notice even the original author
>wasn't sure :-)

I'm the original author (in the UK you'll note), and indeed I wasn't
completely sure.  !HACK! is a "magic cookie" I use to flag things which
require attention.

>-	threshold=mktime(gmtime(&threshold)); /* !HACK! is this correct? */
>+	threshold-=timezone;

That sounds reasonable.  I was trying to avoid using timezone since it isn't
available in ANSI C.  However, since my version doesn't work, that's rather
an irrelevant advantage.

Cheers,
Olly

Technical Details
Message-ID: <slrn5b0hdn.92s.olly@noxious.muscat.co.uk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn5a5fob.11f.gallto@amy.apana.org.au>

Show Full Headers
Complete Article Headers
Message-ID: <slrn5b0hdn.92s.olly@noxious.muscat.co.uk>
Subject: Re: slrn local spool "newgroups" timezone problem(?)
Date: Thu, 12 Dec 1996 00:00:00 +0000
From: olly@noxious.muscat.co.uk (Olly Betts)
References: <slrn5a5fob.11f.gallto@amy.apana.org.au>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 203729257
X-nntp-posting-host: noxious.muscat.co.uk
Newsgroups: news.software.readers