From owner-freebsd-bugs Tue Oct 6 20:53:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA25113 for freebsd-bugs-outgoing; Tue, 6 Oct 1998 20:53:59 -0700 (PDT) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from fan.net.au (fan.net.au [203.20.92.1]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA25100 for ; Tue, 6 Oct 1998 20:53:52 -0700 (PDT) (envelope-from q@fan.net.au) Received: from gromit.fan.net.au (gromit.fan.net.au [203.23.133.34]) by fan.net.au (8.9.1/8.9.1) with SMTP id NAA11883; Wed, 7 Oct 1998 13:53:34 +1000 (EST) Date: Wed, 7 Oct 1998 13:53:34 +1000 (EST) From: Q To: =?ISO-8859-1?Q?Dag-Erling_C=2E_Sm=F8rgrav?= cc: freebsd-bugs@FreeBSD.ORG Subject: Re: misc/8156: mktime does not set tm_wday In-Reply-To: Message-ID: MIME-Version: 1.0 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 UAA25103 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On 6 Oct 1998, Dag-Erling C. Smørgrav wrote: > 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. I wasn't implying a Y2K issue with using the struct, only that there can be issues if not used correctly. I was only suggesting that one should be careful and think when doing maths with dates. Sorry I probably should have been a little more direct. Seeya...Q -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- _____ / Quinton Dolan - q@fan.net.au __ __/ / / __/ / / Systems Administrator / __ / _/ / / Fast Access Network __/ __/ __/ ____/ / - / Gold Coast, QLD, Australia _______ / Ph: +61 7 5574 1050 \_\ SAGE-AU Member To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message