#27095 [Opn->Csd]: strtotime()
| From: | ozsvar at yahoo dot com | Date: | Fri, 30 Jan 2004 09:16:47 +0000 |
| Subject: | #27095 [Opn->Csd]: strtotime() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-54172@lists.php.net to get a copy of this message | ||
ID: 27095
User updated by: ozsvar at yahoo dot com
Reported By: ozsvar at yahoo dot com
-Status: Open
+Status: Closed
Bug Type: Date/time related
Operating System: Linux, Windows
PHP Version: 4.3.4
New Comment:
My remark was wrong. I'm sorry. :(
Previous Comments:
------------------------------------------------------------------------
[2004-01-30 04:05:29] ozsvar at yahoo dot com
Description:
------------
I have found a bug at function strtotime().
When the system date is 30. January and I call strtotime with
parameter: +1 month the result is wrong: March!!!
Reproduce code:
---------------
<?
// If the system date is 2004-01-30
echo date("Y-m", strtotime("+1 month"));
// The result will be 2004-03 !!!!!!
?>
Expected result:
----------------
I expect 2004-02 !!!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27095&edit=1