ID: 39139 Updated by: [EMAIL PROTECTED] Reported By: faty at e-technics dot com -Status: Assigned +Status: Bogus Bug Type: Date/time related Operating System: OpenSUSE 10.1 PHP Version: 5.1.6 Assigned To: derick New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php No, it goes back to April 31st, which does not exist. (April only has 30 days). The first day after April 30th is May 1st. Previous Comments: ------------------------------------------------------------------------ [2006-10-12 14:30:14] faty at e-technics dot com Description: ------------ Strtotime should subtract exactly one month if the parameter is "last month" or "-1 month". Instead it subtracts 30 days. Reproduce code: --------------- // 1149022800 is the timestamp for 31 may 2006 echo date('d/m/Y',strtotime('last month',1149022800)); Expected result: ---------------- 30/04/2006 Actual result: -------------- 1/05/2006 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39139&edit=1
