Bug #10686 Updated: Bug in "mktime()" on values out of bounds
| From: | dieter at fiebelkorn dot net | Date: | Fri, 03 May 2002 06:02:39 +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-6804@lists.php.net to get a copy of this message | ||
ID: 10686
Updated by: dieter@fiebelkorn.net
Reported By: dieter@fiebelkorn.net
Status: No Feedback
Bug Type: Date/time related
-Operating System: MacOS X 10.0.2 - 10.1.3 (Darwin)
+Operating System: MacOS X 10.0.2 - 10.1.4 (Darwin)
-PHP Version: 4.0.5 - 4.1.2
+PHP Version: 4.0.5 - 4.2.0
New Comment:
I'm unable to compile PHP 4.2 on MacOS X 10.1.4 (Darwin 5.4). But i
haven't seen a patch, which solved the described problem! mktime() will
used with numbers out of range!
Dieter
-----
/Users/dieter/Desktop/php-4.2.0/libtool: parse error: condition
expected: xno = [3147]
/usr/bin/libtool: file: stub.lo is not an object file (not allowed in a
library)
Previous Comments:
------------------------------------------------------------------------
[2002-05-03 00:00:04] php-bugs@lists.php.net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2002-04-02 13:43:46] sander@php.net
It was probably fixed in 4.2.0. Can you try 4.2.0RC1 from
www.php.net/~derick ?
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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