Date: Mon, 20 Sep 1999 17:50:02 -0700 (PDT) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/13862: mktime() fails (returns -1) on some dates. Message-ID: <199909210050.RAA66954@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/13862; it has been noted by GNATS. From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: Fabio Dias <duwde@elitenet.com.br> 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) <<On Mon, 20 Sep 1999 22:27:29 +0200, Fabio Dias <duwde@elitenet.com.br> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909210050.RAA66954>