🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #56290

Re: slrn y2k bug?

#56290
From: Remco Gerlich
Date: Mon, 03 Jan 2000 00:00
33 lines
2208 bytes
Brian McCrary wrote in news.software.readers:
> I too, am having the same problems with slrn after rolling over to y2k.
> While I'm certainly not a programmer, it looks like these lines may be of
> as issue in the slrnpull.c file, starting at line 205:
> 
> static void write_timestamp (FILE *fp) /*{{{*/
> {
>    struct tm *tms;
>    time_t tloc;
>    
>    time (&tloc);
>    tms = localtime (&tloc);
>    
>    fprintf (fp, "%02d/%02d/%04d %02d:%02d:%02d ",
>             tms->tm_mon + 1, tms->tm_mday, 1900 + tms->tm_year,
>             tms->tm_hour, tms->tm_min, tms->tm_sec);
>    
> This looks like to me it's writing out it's inewsrc.time file incorrectly,
> then complaining about it, and when trying to fix it, writes it out wrong
> again.  Am I way off here?  Or maybe this is a simple fix?

This looks to me like the perfectly normal way to write out a date
to a file in mm/dd/yyyy hh:mm:ss format. Correctly.

"%04d" means print 4 digits, "tms->tm_year" is the number of years since
1900, "1900 + tms->tm_year" is the current year.

Where do you see it writing it out twice and complaining?!
-- 
Remco Gerlich,  scarblac@pino.selwerd.cx
Hi! I'm a .sig virus! Join the fun and copy me into yours!

Technical Details
Message-ID: <slrn871mj7.31l.scarblac-spamtrap@flits104-37.flits.rug.nl>
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: <slrn86sblt.poo.soma@amanda.dorsai.org> <84ledf$7q0$1@panix7.panix.com> <slrn86sund.7p1.davis@aluche.mit.edu> <84mi8u$qc9$1@panix.com> <slrn871j19.f5d.bmccrary@shcircuit.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrn871mj7.31l.scarblac-spamtrap@flits104-37.flits.rug.nl>
Subject: Re: slrn y2k bug?
Date: Mon, 03 Jan 2000 00:00:00 +0000
From: scarblac-spamtrap@pino.selwerd.cx (Remco Gerlich)
References: <slrn86sblt.poo.soma@amanda.dorsai.org> <84ledf$7q0$1@panix7.panix.com> <slrn86sund.7p1.davis@aluche.mit.edu> <84mi8u$qc9$1@panix.com> <slrn871j19.f5d.bmccrary@shcircuit.com>
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: 567812636
X-Complaints-To: newsmaster@rug.nl
X-Trace: info.service.rug.nl 946920081 12436 129.125.104.37 (3 Jan 2000 17:21:21 GMT)
Organization: Rijksuniversiteit Groningen
User-Agent: slrn/0.9.6.2 (Linux)
Reply-To: scarblac-rt@pino.selwerd.cx
NNTP-Posting-Date: 3 Jan 2000 17:21:21 GMT
Newsgroups: news.software.readers