#39139 [Opn->Asn]: Last month bug
| From: | tony2001@php.net | Date: | Thu, 12 Oct 2006 14:49:31 +0000 |
| Subject: | #39139 [Opn->Asn]: Last month bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103481@lists.php.net to get a copy of this message | ||
ID: 39139
Updated by: tony2001@php.net
Reported By: faty at e-technics dot com
-Status: Open
+Status: Assigned
Bug Type: Date/time related
Operating System: OpenSUSE 10.1
PHP Version: 5.1.6
-Assigned To:
+Assigned To: derick
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