bin/40278: mktime returns -1 for certain dates/timezones when
it should normalize
Marc Olzheim
marcolz at stack.nl
Thu May 15 08:51:55 UTC 2008
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-stable
mailing list