Bug #10686 Updated: Bug in "mktime()" on values out of bounds

From: Date: Tue, 02 Apr 2002 18:43:48 +0000
Subject: Bug #10686 Updated: Bug in "mktime()" on values out of bounds
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-3849@lists.php.net to get a copy of this message
ID: 10686 Updated by: sander@php.net Reported By: dieter@fiebelkorn.net -Status: Open +Status: Feedback Bug Type: Date/time related Operating System: MacOS X 10.0.2 - 10.1.3 (Darwin) PHP Version: 4.0.5 - 4.1.2 New Comment: It was probably fixed in 4.2.0. Can you try 4.2.0RC1 from www.php.net/~derick ? Previous Comments: ------------------------------------------------------------------------ [2002-03-14 17:03:27] dieter@fiebelkorn.net Happen on MacOS X 10.0.0 up to 10.1.3: Darwin localhost 5.3 Darwin Kernel Version 5.3: Thu Jan 24 22:06:02 PST 2002; root:xnu/xnu-201.19.obj~1/RELEASE_PPC Power Macintosh powerpc ------------------------------------------------------------------------ [2002-03-14 17:01:07] dieter@fiebelkorn.net I cannot see it fixed in 4.1.2. Try my fix ... that works! 01.02.2000 --> 949402800 --> 01.02.2000 12:00:00 00.02.2000 --> 949316400 --> 31.01.2000 12:00:00 -1.02.2000 --> 949230000 --> 30.01.2000 12:00:00 01.03.2000 --> 951908400 --> 01.03.2000 12:00:00 00.03.2000 --> 951735600 --> 28.02.2000 12:00:00 -1.03.2000 --> 951649200 --> 27.02.2000 12:00:00 01.04.2000 --> 954583200 --> 01.04.2000 12:00:00 00.04.2000 --> 954410400 --> 30.03.2000 12:00:00 -1.04.2000 --> 954324000 --> 29.03.2000 12:00:00 01.05.2000 --> 957175200 --> 01.05.2000 12:00:00 00.05.2000 --> 957002400 --> 29.04.2000 12:00:00 -1.05.2000 --> 956916000 --> 28.04.2000 12:00:00 01.06.2000 --> 959853600 --> 01.06.2000 12:00:00 00.06.2000 --> 959680800 --> 30.05.2000 12:00:00 -1.06.2000 --> 959594400 --> 29.05.2000 12:00:00 <? $tm_sec=0; $tm_min=0; $tm_hour=0; $tm_year=100; $tm_wday=0; $tm_yday=0; $tm_isdst=0; $tm_gmtoff=0; $tm_zone=0; for ($j=2; $j<=6; $j++) { for ($i=1; $i>=-1; $i--) { $tm_mday=$i; $tm_mon=$j; printf ("%02d.%02d.%04d", $tm_mday, $tm_mon,1900+$tm_year); $tm = mktime(12,0,0,$tm_mon,$tm_mday,1900+ $tm_year); echo " --> $tm"; echo " --> ".date("d.m.Y H:i:s", $tm); echo "<br>"; } } ?> ------------------------------------------------------------------------ [2002-01-08 16:06:23] derick@php.net This is reported fixed. ------------------------------------------------------------------------ [2001-11-18 02:37:56] dieter@fiebelkorn.net From: "Abner Diaz" <abner@criticalnexus.com> I can verify the behavior of PHP Bug ID 10686 (http:// bugs.php.net/bug.php?id=10686), regarding mktime malfunctions in OS X 10.1/Darwin 1.4.   The fixes to datetime.c posted by dieter@fiebelkorn.net worked well.  Thanks!   Sincerely, Abner Diaz ------------------------------------------------------------------------ [2001-10-23 09:03:49] dieter@fiebelkorn.net Does it looks well? (Same in MacOS X 10.1 and Darwin 1.4.1) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/10686 -- Edit this bug report at http://bugs.php.net/?id=10686&edit=1

« previous php.bugs (#3849) next »