ID: 10686
Updated by: [EMAIL PROTECTED]
-Summary: Bug in "mktime()" on values out of bounds
Reported By: [EMAIL PROTECTED]
-Status: Closed
+Status: Open
Bug Type: Date/time related
Operating System: MacOS X 10.0.2 (Darwin)
-PHP Version: 4.0.5
+PHP Version: 4.0.5 - 4.1.2
New Comment:
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>";
}
}
?>
Previous Comments:
------------------------------------------------------------------------
[2002-01-08 16:06:23] [EMAIL PROTECTED]
This is reported fixed.
------------------------------------------------------------------------
[2001-11-18 02:37:56] [EMAIL PROTECTED]
From: "Abner Diaz" <[EMAIL PROTECTED]>
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 [EMAIL PROTECTED] worked well.�
Thanks!
�
Sincerely,
Abner Diaz
------------------------------------------------------------------------
[2001-10-23 09:03:49] [EMAIL PROTECTED]
Does it looks well? (Same in MacOS X 10.1 and Darwin 1.4.1)
------------------------------------------------------------------------
[2001-08-18 21:30:34] [EMAIL PROTECTED]
i have a MacOSX box now so I'll test this out and submit it
if it looks good...
------------------------------------------------------------------------
[2001-06-11 14:28:32] [EMAIL PROTECTED]
> you can use Darwin/Intel (see: http://www.darwinfo.de), if
Sorry. Informations about Darwin you can find on:
- http://www.darwinfo.org/
- http://www.apple.com/darwin/
Dieter
------------------------------------------------------------------------
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