From owner-freebsd-bugs Mon Sep 20 17:50: 3 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6DCD414C38 for ; Mon, 20 Sep 1999 17:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id RAA66954; Mon, 20 Sep 1999 17:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Mon, 20 Sep 1999 17:50:02 -0700 (PDT) Message-Id: <199909210050.RAA66954@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Garrett Wollman Subject: Re: misc/13862: mktime() fails (returns -1) on some dates. Reply-To: Garrett Wollman Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/13862; it has been noted by GNATS. From: Garrett Wollman To: Fabio Dias Cc: freebsd-gnats-submit@freebsd.org Subject: Re: misc/13862: mktime() fails (returns -1) on some dates. Date: Mon, 20 Sep 1999 20:39:59 -0400 (EDT) < said: > My timezone is America -> Brazil -> SE ! (EST) The fact that your problem is timezone-dependent should have given you a clue. The time you have specified (midnight) does not exist in your timezone on that date, due to the switch over to (or from) summer time. Thus, mktime() is correct to return an error. If you retry your request with tm_isdst set to -1, mktime() will attempt to guess whether you mean standard time or summer (daylight savings) time -- but there are still times which are impossible to resolve. Most other countries switch at times other than midnight. You might find the results less surprising if you updated your timezone files to more recent ones which reflect the latest legal time changes in Brazil. In sum: there is no bug here. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message