From: eparis at plurimedia dot fr Operating system: Linux Debian / Solaris ... any PHP version: Irrelevant PHP Bug Type: Date/time related Bug description: Bug in strtotime calculation (bissextile year ?)
Description: ------------ Since today (2004-03-30), we experience a calculation error when using strtotime("-1 month") to get previous month date. Maybe this error is due to the fact that 2004 is a bissextile year. The last bissextile year was 1996. Reproduce code: --------------- The actual computer date must be 2004-03-30. <? print strftime("%Y-%m-%d", strtotime("-1 month"))."\n"; ?> Expected result: ---------------- 2004-02-29 Actual result: -------------- 2004-03-01 -- Edit bug report at http://bugs.php.net/?id=27774&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27774&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27774&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27774&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27774&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27774&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27774&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27774&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27774&r=support Expected behavior: http://bugs.php.net/fix.php?id=27774&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27774&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27774&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27774&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27774&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27774&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27774&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27774&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27774&r=float