#22957 [Com]: Date output is not correct

From: Date: Sun, 30 Mar 2003 11:59:36 +0000
Subject: #22957 [Com]: Date output is not correct
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-36702@lists.php.net to get a copy of this message
ID: 22957 Comment by: noel at crewe-it-nosp dot co dot uk Reported By: jacques dot daguerre at st dot com Status: Open Bug Type: Date/time related Operating System: Linux RedHat 6.2/7.3 PHP Version: 4.3.1 New Comment: I've also hit the problem with mktime giving incorrect results. On 4.3.2-dev it atually returns -3662 as the date value. Worse though, it returns the same value for 31st March 2002 28th March 2004 27th March 2005 26th March 2006 and so on. Previous Comments: ------------------------------------------------------------------------ [2003-03-30 03:25:45] jacques dot daguerre at st dot com PHP Bug with mktime ???.. I just checked with 2 different versions of PHP : PHP 4.1.2 and PHP 4.2.1... Sorry I have not installed the latest version but I could not find anything in the changelog either !.. The following code TODAY (only today March 30th, 2003) is not giving the expected output . $lastmonth1 = mktime (0,0,0,(date("m")-1),date("d"),date("Y")); $lastmonth = date ("Y-m-d", $lastmonth1); The result of lastmonth should show "2003-02-28" and it shows "2003-03-02".. Looks like a bug to me ! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22957&edit=1

« previous php.bugs (#36702) next »