#47457 [Opn->Bgs]: strtotime converts 02/31/2008 to 02/03/2008
| From: | derick@php.net | Date: | Fri, 20 Feb 2009 10:04:17 +0000 |
| Subject: | #47457 [Opn->Bgs]: strtotime converts 02/31/2008 to 02/03/2008 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134036@lists.php.net to get a copy of this message | ||
ID: 47457
Updated by: derick@php.net
Reported By: robm at pmci dot com
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: ubuntu 8.04 lts
PHP Version: 5.2.9RC3
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
.
Previous Comments:
------------------------------------------------------------------------
[2009-02-20 04:14:42] robm at pmci dot com
Description:
------------
strtotime issue
Reproduce code:
---------------
$datestring = '02/31/2008';
if(strtotime($datestring)) {echo date('d/m/Y',strtotime($datestring));}
else {echo 'not valid date'; exit;}
Expected result:
----------------
expect FALSE on 02/30/2008 and 02/31/2008
addl comment: Have not tested for leap yrs, but hope they will work as
well.
Actual result:
--------------
function accepts 02/30/2008 and 02/31/2008 as valid dates, and when I
return either timestamp back as a date it returns 02/03/2008.
I AM ACTUALLY USING 5.2.6. I submitted bug because I imagine it would
have to have been fixed by this version if fixed. If this is already
fixed, thanks.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47457&edit=1