|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-08 20:22 UTC] pollita@php.net
[2004-07-08 21:22 UTC] ehavet at yahoo dot fr
[2004-07-08 21:51 UTC] ehavet at yahoo dot fr
[2004-07-09 08:03 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 29 12:00:01 2025 UTC |
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