bin/40278: mktime returns -1 for certain dates/timezones when
it should normalize
Marc Olzheim
marcolz at stack.nl
Thu May 15 09:00:07 UTC 2008
The following reply was made to PR bin/40278; it has been noted by GNATS.
From: Marc Olzheim <marcolz at stack.nl>
To: bug-followup at FreeBSD.org, martin at bnc.ch
Cc: freebsd-stable at freebsd.org
Subject: Re: bin/40278: mktime returns -1 for certain dates/timezones when it should normalize
Date: Thu, 15 May 2008 10:51:54 +0200
With the testcode I put on
http://www.stack.nl/~marcolz/FreeBSD/pr-bin-40278/40278.c I can
reproduce it on FreeBSD 4.11:
output on 4.11-STABLE
------
Init: mktime: 1014944400 Fri Mar 1 02:00:00 CET 2002
1: mktime: 4294967295 Fri Apr 0 02:00:00 CET 2002
Init: mktime: 1014944400 Fri Mar 1 02:00:00 CET 2002
2a: mktime: 1017622800 Mon Apr 1 03:00:00 CEST 2002
2b: mktime: 1017536400 Sun Mar 31 03:00:00 CEST 2002
Init: mktime: 1014944400 Fri Mar 1 02:00:00 CET 2002
3a: mktime: 1014858000 Thu Feb 28 02:00:00 CET 2002
3b: mktime: 1017277200 Thu Mar 28 02:00:00 CET 2002
------
But it is fixed on my FreeBSD 6.x and up systems:
output on 6.3-PRERELEASE:
------
Init: mktime: 1014944400 Fri Mar 1 02:00:00 CET 2002
1: mktime: 1017536400 Sun Mar 31 03:00:00 CEST 2002
Init: mktime: 1014944400 Fri Mar 1 02:00:00 CET 2002
2a: mktime: 1017622800 Mon Apr 1 03:00:00 CEST 2002
2b: mktime: 1017536400 Sun Mar 31 03:00:00 CEST 2002
Init: mktime: 1014944400 Fri Mar 1 02:00:00 CET 2002
3a: mktime: 1014858000 Thu Feb 28 02:00:00 CET 2002
3b: mktime: 1017277200 Thu Mar 28 02:00:00 CET 2002
------
So it looks like it has been fixed in the mean time and that this PR can
be closed.
Marc
More information about the freebsd-bugs
mailing list