Bug #51994 [Opn->Asn]: date_parse_from_format parsing invalid date
| From: | derick@php.net | Date: | Fri, 04 Jun 2010 10:41:11 +0000 |
| Subject: | Bug #51994 [Opn->Asn]: date_parse_from_format parsing invalid date | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-151088@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51994&edit=1
ID: 51994
Updated by: derick@php.net
Reported by: sjzurek at gmail dot com
Summary: date_parse_from_format parsing invalid date
-Status: Open
+Status: Assigned
Type: Bug
Package: Date/time related
Operating System: Windows XP SP3
PHP Version: 5.3.2
-Assigned To:
+Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2010-06-04 12:04:01] sjzurek at gmail dot com
Description:
------------
date_parse_from_format is parsing invalid date using 'yz' format
Test script:
---------------
<?php
$trans_date = '10153';
$a_date = date_parse_from_format ('yz',$trans_date);
print_r($a_date);
?>
Expected result:
----------------
[year] => 2010
[month] => 6
[day] => 3
Actual result:
--------------
Array (
[year] => 2010
[month] => 1 <===== wrong
[day] => 154 <===== wrong
[hour] =>
[minute] =>
[second] =>
[fraction] =>
[warning_count] => 1
[warnings] => Array (
[5] => The parsed date was invalid
)
[error_count] => 0
[errors] => Array ( )
[is_localtime] =>
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51994&edit=1