#41709 [NEW]: error in date_parse function
| From: | xsuchy09 at gmail dot com | Date: | Fri, 15 Jun 2007 20:46:37 +0000 |
| Subject: | #41709 [NEW]: error in date_parse function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-113841@lists.php.net to get a copy of this message | ||
From: xsuchy09 at gmail dot com
Operating system: Windows XP
PHP version: 5.2.3
PHP Bug Type: Date/time related
Bug description: error in date_parse function
Description:
------------
date_parse function returns wrong value in year index in returned array
when parameter is '00.00.0000 - 00:00:00'
Reproduce code:
---------------
$date_string = '00.00.0000 - 00:00:00';
print_r(date_parse($date_string));
Expected result:
----------------
Array ( [year] => 0000 [month] => 0 [day] => 0 [hour] => 0 [minute] => 0
[second] => 0 [fraction] => 0 [warning_count] => 0 [warnings] => Array ( )
[error_count] => 1 [errors] => Array ( [11] => Unexpected character )
[is_localtime] => )
Actual result:
--------------
Array ( [year] => 2000 [month] => 0 [day] => 0 [hour] => 0 [minute] => 0
[second] => 0 [fraction] => 0 [warning_count] => 0 [warnings] => Array ( )
[error_count] => 1 [errors] => Array ( [11] => Unexpected character )
[is_localtime] => )
--
Edit bug report at http://bugs.php.net/?id=41709&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41709&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41709&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41709&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41709&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41709&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41709&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41709&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41709&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41709&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41709&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41709&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41709&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41709&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41709&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41709&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41709&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41709&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41709&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41709&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41709&r=mysqlcfg