From:             xg_wahyu at yahoo dot com
Operating system: Windows XP
PHP version:      5.1.6
PHP Bug Type:     Date/time related
Bug description:  mktime() doesn't work after 28 October 2006

Description:
------------
I run such script on my webserver Apache 2.0 running PHP 5.1.6
Before the date 28 October 2006 inclusive, everything works fine. On the
29 October, the result does not yield string "29 October 2006" and after
29 October 2006 the script simply crashes the server (the task manager
indicates 50% CPU time on apache.exe from my pentium 4 HT processor for 30
seconds before timeout)

Halloween Egg? (not easter egg)?

Reproduce code:
---------------
$now = mktime(0,0,0,date('m'),date('d'),date('Y'));
$first = mktime(0,0,0,10,1,2006);
$diff = ($now - $first)/86400 + 1;
for ($i=$diff;$i>0;$i--) {
        $a = strtotime("-$i day");
        $today = getdate("$a");
        $month_format = $today['mon'];
        $day_format = $today['mday'];
        $year_format = $today['year'];
        echo "$month_format/$day_format/$year_format<br />";
}

Expected result:
----------------
Anything ranging from the date 9/30/2006 up to the current date set on the
server clock

Actual result:
--------------
//date:27 october 2006 (correct)
...
10/25/2006
10/26/2006
10/27/2006

//date:28 october 2006 (correct)
...
10/25/2006
10/26/2006
10/27/2006
10/28/2006

//date:29 october 2006 (simply '10/29/2006' missing)
...
10/25/2006
10/26/2006
10/27/2006
10/28/2006

//date:30 october 2006 and so on (simply crashes the system and
returns...
"Fatal error: Maximum execution time of 30 seconds exceeded in
D:\php\toko\ntz.php on line 15")

-- 
Edit bug report at http://bugs.php.net/?id=39311&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39311&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39311&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39311&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39311&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39311&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39311&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39311&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39311&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39311&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39311&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39311&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39311&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39311&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39311&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39311&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39311&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39311&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39311&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39311&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39311&r=mysqlcfg

Reply via email to