From: ehavet at yahoo dot fr Operating system: Linux 2.4.16C12 PHP version: 4.3.6 PHP Bug Type: Date/time related Bug description: Some wrong dates when using gtdate()/mktime()
Description: ------------ When you want to display each 10/31/Year plus 1 day, you've got sometimes 10/31/Year instead of 11/01/Year. Noticed on PHP 4.3.3 (ISP linux server) and PHP 4.3.6 (WinXP personal system) Getting the date with date("m/d/Y", mktime(0,0,0,10,31,$i)+(24*3600)); gives the same result exept for 11/1/1993 Reproduce code: --------------- <?php for ($i = 1990 ;$i < 2011 ; $i++) { $date = getdate(mktime(0,0,0,10,31,$i)+(24*3600)); echo $date['mon']."/".$date['mday']."/".$date['year']."\n"; } ?> Expected result: ---------------- 11/1/1990 11/1/1991 11/1/1992 11/1/1993 11/1/1994 11/1/1995 11/1/1996 11/1/1997 11/1/1998 11/1/1999 11/1/2000 ... Actual result: -------------- 11/1/1990 11/1/1991 11/1/1992 10/31/1993 11/1/1994 11/1/1995 11/1/1996 11/1/1997 11/1/1998 10/31/1999 11/1/2000 11/1/2001 11/1/2002 11/1/2003 10/31/2004 11/1/2005 11/1/2006 11/1/2007 11/1/2008 11/1/2009 10/31/2010 11/1/2011 -- Edit bug report at http://bugs.php.net/?id=29065&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29065&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29065&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29065&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29065&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29065&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29065&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29065&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29065&r=support Expected behavior: http://bugs.php.net/fix.php?id=29065&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29065&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29065&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29065&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29065&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29065&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29065&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29065&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29065&r=float