Skip site navigation (1)Skip section navigation (2)
Date:      06 Oct 1998 16:50:57 +0200
From:      dag-erli@ifi.uio.no (Dag-Erling C. =?iso-8859-1?Q?Sm=F8rgrav?= )
To:        Q <q@fan.net.au>
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: misc/8156: mktime does not set tm_wday
Message-ID:  <xzpzpb9hhgu.fsf@skejdbrimir.ifi.uio.no>
In-Reply-To: Q's message of "Mon, 5 Oct 1998 07:00:00 -0700 (PDT)"
References:  <199810051400.HAA06697@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Q <q@fan.net.au> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpzpb9hhgu.fsf>