Bug #51994 [Asn->Csd]: date_parse_from_format parsing invalid date

From: Date: Tue, 06 Dec 2011 06:21:40 +0000
Subject: Bug #51994 [Asn->Csd]: date_parse_from_format parsing invalid date
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-165686@lists.php.net to get a copy of this message
Edit report at https://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: Assigned +Status: Closed Type: Bug Package: Date/time related Operating System: Windows XP SP3 PHP Version: 5.3.2 Assigned To: derick Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2011-12-06 06:20:54] derick@php.net Automatic comment from SVN on behalf of derick Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=320481 Log: - Fixed bug #53502 (strtotime with timezone memory leak). - Fixed bug #52062 (large timestamps with DateTime::getTimestamp and DateTime::setTimestamp). - Fixed bug #51994 (date_parse_from_format is parsing invalid date using 'yz' format). - Fixed bug #51223 (Seg fault while creating (by unserialization) DatePeriod). ------------------------------------------------------------------------ [2010-07-18 00:17:50] k.schroeder@php.net Automatic comment from SVN on behalf of k.schroeder Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=301358 Log: Test for #51994 ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=51994&edit=1

« previous php.bugs (#165686) next »