From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Mar 28 14:40:09 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E0B816A4CF for ; Sun, 28 Mar 2004 14:40:09 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D37343D46 for ; Sun, 28 Mar 2004 14:40:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i2SMe9bv090555 for ; Sun, 28 Mar 2004 14:40:09 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i2SMe9rv090554; Sun, 28 Mar 2004 14:40:09 -0800 (PST) (envelope-from gnats) Resent-Date: Sun, 28 Mar 2004 14:40:09 -0800 (PST) Resent-Message-Id: <200403282240.i2SMe9rv090554@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Johannes Groedem Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81C5B16A4CE for ; Sun, 28 Mar 2004 14:30:53 -0800 (PST) Received: from justice.copyleft.no (justice.copyleft.no [212.71.72.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id B0F8A43D2F for ; Sun, 28 Mar 2004 14:30:52 -0800 (PST) (envelope-from johs@justice.copyleft.no) Received: (from johs@localhost) by justice.copyleft.no (8.11.6/8.11.6) id i2SMUod07899; Mon, 29 Mar 2004 00:30:50 +0200 (CEST) (envelope-from johs) Message-Id: <200403282230.i2SMUod07899@justice.copyleft.no> Date: Mon, 29 Mar 2004 00:30:50 +0200 (CEST) From: Johannes Groedem To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/64871: Leap year calculation is broken in cvstrac. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Johannes Groedem List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Mar 2004 22:40:09 -0000 >Number: 64871 >Category: ports >Synopsis: Leap year calculation is broken in cvstrac. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 28 14:40:08 PST 2004 >Closed-Date: >Last-Modified: >Originator: Johannes Groedem >Release: FreeBSD 4.5-RELEASE-p5 i386 >Organization: Copyleft Software AS >Environment: >Description: Leap year calculation is broken, so that CVS check-ins are assigned wrong dates in the cvstrac-web-interface. Attached patch fixes it. (I've also submitted it to the cvstrac-author.) >How-To-Repeat: Just do a check-in. It will appear on cvstrac's timeline to have been checked in one day earlier than the actual day of the check-in. >Fix: Apply patch. --- patch-history.c begins here --- --- history.c 5 Apr 2003 16:04:21 -0000 1.28 +++ history.c 28 Mar 2004 21:01:11 -0000 @@ -155,7 +155,7 @@ p->tm_year += p->tm_mon/12; p->tm_mon %= 12; } - isLeapYr = p->tm_year/4==0 && (p->tm_year/100!=0 || (p->tm_year+300)/400==0); + isLeapYr = p->tm_year%4==0 && (p->tm_year%100!=0 || p->tm_year%400==0); p->tm_yday = priorDays[p->tm_mon] + p->tm_mday - 1; if( isLeapYr && p->tm_mon>1 ) p->tm_yday++; nDay = (p->tm_year-70)*365 + (p->tm_year-69)/4 -p->tm_year/100 + --- patch-history.c ends here --- >Release-Note: >Audit-Trail: >Unformatted: