From owner-freebsd-bugs Tue Oct 6 07:53:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA00714 for freebsd-bugs-outgoing; Tue, 6 Oct 1998 07:53:13 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA00542 for ; Tue, 6 Oct 1998 07:52:23 -0700 (PDT) (envelope-from dag-erli@ifi.uio.no) Received: from skejdbrimir.ifi.uio.no (2602@skejdbrimir.ifi.uio.no [129.240.65.2]) by ifi.uio.no (8.8.8/8.8.7/ifi0.2) with SMTP id QAA17622; Tue, 6 Oct 1998 16:51:14 +0200 (MET DST) Received: from localhost (dag-erli@localhost) by skejdbrimir.ifi.uio.no ; Tue, 6 Oct 1998 14:51:07 GMT Mime-Version: 1.0 To: Q Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: misc/8156: mktime does not set tm_wday References: <199810051400.HAA06697@freefall.freebsd.org> Organization: University of Oslo, Department of Informatics X-url: http://www.stud.ifi.uio.no/~dag-erli/ X-other-addresses: 'finger dag-erli@ifi.uio.no' for a list X-disclaimer-1: The views expressed in this article are mine alone, and do X-disclaimer-2: not necessarily coincide with those of any organisation or X-disclaimer-3: company with which I am or have been affiliated. X-Stop-Spam: http://www.cauce.org/ From: dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= ) Date: 06 Oct 1998 16:50:57 +0200 In-Reply-To: Q's message of "Mon, 5 Oct 1998 07:00:00 -0700 (PDT)" Message-ID: Lines: 13 X-Mailer: Gnus v5.5/Emacs 19.34 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id HAA00710 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Q writes: > It's not a bug. Your using the struct incorrectly. Every call you make to > mktime() will be returning -1. You are effectively asking it for the year > 3899. Which can't be expresses using a time_t value. Change 'tm_year = > 1999' to 'tm_year = 99'. You should put your Y2K hat on if you plan to use > a 'struct tm' in your application. If you think tm_year poses a Y2K problem, you've got another think coming. Apart from that, your analysis is correct. I'm closing the PR. DES -- Dag-Erling Smørgrav - dag-erli@ifi.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message