Marc Olzheim
2008-May-15 08:52 UTC
bin/40278: mktime returns -1 for certain dates/timezones when it should normalize
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
Gavin Atkinson
2008-May-15 15:11 UTC
bin/40278: mktime returns -1 for certain dates/timezones when it should normalize
On Thu, 2008-05-15 at 10:51 +0200, Marc Olzheim wrote:> 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:[snip]> But it is fixed on my FreeBSD 6.x and up systems:[snip] Many thanks for going to the effort of testing this. I've closed the PR. Gavin