note 17457 added to function.mktime

From: Date: Mon, 10 Dec 2001 09:25:43 +0000
Subject: note 17457 added to function.mktime
Groups: php.notes 
Request: Send a blank email to php-notes+get-22425@lists.php.net to get a copy of this message
An amendment to my post above: I ran the function through a for loop, increasing the year each time. Half the years the output is accurate. %25 of the years the output is a day ahead, and 25% of the time it is a day late. Here is the script I ran: for($i=1990; $i<2006; ++$i) { $lastday = mktime (0,0,0,12,0,$i); echo strftime ("Last day in Nov, $i is: %m %d", $lastday); } And here is my output: Last day in Nov, 1990 is: 11 30 Last day in Nov, 1991 is: 11 30 Last day in Nov, 1992 is: 11 29 Last day in Nov, 1993 is: 12 01 Last day in Nov, 1994 is: 11 30 Last day in Nov, 1995 is: 11 30 Last day in Nov, 1996 is: 11 29 Last day in Nov, 1997 is: 12 01 Last day in Nov, 1998 is: 11 30 Last day in Nov, 1999 is: 11 30 Last day in Nov, 2000 is: 11 29 Last day in Nov, 2001 is: 12 01 Last day in Nov, 2002 is: 11 30 Last day in Nov, 2003 is: 11 30 Last day in Nov, 2004 is: 11 29 Last day in Nov, 2005 is: 12 01 Can anybody tell me what could possibly be causing this? -- http://www.php.net/manual/en/function.mktime.php http://master.php.net/manage/user-notes.php?action=edit+17457 http://master.php.net/manage/user-notes.php?action=delete+17457 http://master.php.net/manage/user-notes.php?action=reject+17457

« previous php.notes (#22425) next »