From owner-freebsd-hackers Fri Jan 7 8:23: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pau-amma.whistle.com (pau-amma.whistle.com [207.76.205.64]) by hub.freebsd.org (Postfix) with ESMTP id 10A3915A2E for ; Fri, 7 Jan 2000 08:22:57 -0800 (PST) (envelope-from dhw@whistle.com) Received: (from dhw@localhost) by pau-amma.whistle.com (8.9.2/8.9.2) id IAA16815; Fri, 7 Jan 2000 08:22:29 -0800 (PST) Date: Fri, 7 Jan 2000 08:22:29 -0800 (PST) From: David Wolfskill Message-Id: <200001071622.IAA16815@pau-amma.whistle.com> To: alex@big.endian.de, hackers@FreeBSD.ORG Subject: Re: mktime(3) and strange struct tm entries In-Reply-To: <19991231171423.A4219@cichlids.cichlids.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Date: Fri, 31 Dec 1999 17:14:23 +0100 >From: Alexander Langer >Try the following: >Take any year, minute, seconds, hours (etc...). >set the struct tm accordingly. >set the tm->tm_mon = 10 (November) >set the tm->tm_mday = 31 (november has only 31 days) No. November has but 30 days. >mktime(3) with this tm returns the date 1 Dezember. This is the documented and intended behavior of mktime(). >Does POSIX want this? >Does anyone have the specs and could take a look? >Or is this a bug? It's a C library issue, rather than POSIX or -hackers. Cheers, david -- David Wolfskill dhw@whistle.com UNIX System Administrator voice: (650) 577-7158 pager: (888) 347-0197 FAX: (650) 372-5915 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message