#27095 [Bgs]: strtotime()

From: Date: Fri, 30 Jan 2004 11:27:14 +0000
Subject: #27095 [Bgs]: strtotime()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-54178@lists.php.net to get a copy of this message
ID: 27095 Updated by: derick@php.net Reported By: ozsvar at yahoo dot com Status: Bogus Bug Type: Date/time related Operating System: Linux, Windows PHP Version: 4.3.4 New Comment: Yup, there is no february 30th ;-) Previous Comments: ------------------------------------------------------------------------ [2004-01-30 04:16:46] ozsvar at yahoo dot com My remark was wrong. I'm sorry. :( ------------------------------------------------------------------------ [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

« previous php.bugs (#54178) next »