From: jacques dot daguerre at st dot com Operating system: Linux RedHat 6.2/7.3 PHP version: 4.3.1 PHP Bug Type: Date/time related Bug description: Date output is not correct
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 bug report at http://bugs.php.net/?id=22957&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22957&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22957&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22957&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22957&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22957&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22957&r=support Expected behavior: http://bugs.php.net/fix.php?id=22957&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22957&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22957&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22957&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22957&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22957&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22957&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22957&r=gnused