*BSD News Article 25616


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!news.kei.com!eff!usenet.ins.cwru.edu!howland.reston.ans.net!cs.utexas.edu!uunet!elroy.jpl.nasa.gov!decwrl!netcomsv!netcom.com!fen
From: fen@netcom.com (Fen Labalme)
Subject: Re: FreeBSD-1.0.2: calendar trouble :-(
Message-ID: <fenCJ5LDI.73G@netcom.com>
Organization: NETCOM On-line Communication Services (408 241-9760 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <CJ3nBA.pM@luva.stgt.sub.org>
Date: Wed, 5 Jan 1994 11:03:18 GMT
Lines: 35

I posted this in comp.os.386bsd.bugs -- I had the same problem on
my NetBSD-0.9 system.

There's a problem in calendar.c -- here's the patch:

======

% diff -c calendar.c.~1~ calendar.c
*** calendar.c.~1~	Tue Jan  4 11:48:24 1994
--- calendar.c	Tue Jan  4 14:40:58 1994
***************
*** 139,144 ****
  /* 1-based month, 0-based days, cumulative */
  int daytab[][14] = {
! 	0, 0, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364,
! 	0, 0, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365,
  };
  struct tm *tp;
--- 139,144 ----
  /* 1-based month, 0-based days, cumulative */
  int daytab[][14] = {
! 	0, -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364,
! 	0, -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365,
  };
  struct tm *tp;

======

Enjoy!
Fen
-- 
Fen Labalme                for EFF info,  email <eff@eff.org>
Broadcatch Technologies    for LPF info,  email <league@ai.mit.edu>
<fen@netcom.com>           for CPSR info, email <cpsr@cpsr.org>
415/731-1174               protect your freedoms!  PGP Key ID: 1024/0AF8FD