🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #23393

Re: trn date bug?

#23393
From: Jeff Makey
Date: Tue, 25 Jun 1996 00:00
48 lines
1795 bytes
Here's the patch that works for me.

                             :: Jeff Makey
                                jeff@sdsc.edu

Department of Tautological Pleonasms and Superfluous Redundancies Department

-----------------------------------------------------------------

*** trn-3.6/nntp.c.~1~	Fri Nov 18 22:01:23 1994
--- trn-3.6/nntp.c	Wed Jan 10 18:31:10 1996
***************
*** 306,312 ****
      s[4] = '\0';
      year = atoi(s);
  
!     /* This simple algorithm will be valid until the year 2400 */
      if (year % 4)
  	maxdays[2] = 28;
      else
--- 306,312 ----
      s[4] = '\0';
      year = atoi(s);
  
!     /* This simple algorithm will be valid through the year 2099 */
      if (year % 4)
  	maxdays[2] = 28;
      else
***************
*** 319,325 ****
      for (month--; month; month--)
  	day += maxdays[month];
  
!     ss = ((((year-1970) * 365 + (year-1968)/4 + day - 1) * 24L + hh) * 60
  	  + mm) * 60 + ss;
  
      return ss;
--- 319,325 ----
      for (month--; month; month--)
  	day += maxdays[month];
  
!     ss = ((((year-1970) * 365 + (year-1969)/4 + day - 1) * 24L + hh) * 60
  	  + mm) * 60 + ss;
  
      return ss;

Technical Details
Message-ID: <4qpm4d$bq0@rosebud.sdsc.edu>
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: <4qoqgk$f6m@suba01.suba.com>

Show Full Headers
Complete Article Headers
Message-ID: <4qpm4d$bq0@rosebud.sdsc.edu>
Subject: Re: trn date bug?
Date: Tue, 25 Jun 1996 00:00:00 +0000
From: jeff@sdsc.edu (Jeff Makey)
References: <4qoqgk$f6m@suba01.suba.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: 162142070
Organization: San Diego Supercomputer Center, San Diego, California
Newsgroups: news.software.readers
Originator: jeff@rosebud.sdsc.edu