#50199 [NEW]: date_parse_from_format won't parse ISO 8601
| From: | peter dot ritt at gmx dot net | Date: | Mon, 16 Nov 2009 23:14:15 +0000 |
| Subject: | #50199 [NEW]: date_parse_from_format won't parse ISO 8601 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-144691@lists.php.net to get a copy of this message | ||
From: peter dot ritt at gmx dot net
Operating system: linux
PHP version: 5.3.0
PHP Bug Type: Date/time related
Bug description: date_parse_from_format won't parse ISO 8601
Description:
------------
date_parse_from_format refuses to read '2009-11-17T00:08:24+01:00';
error: The format separator does not match
Reproduce code:
---------------
$d = date('c');
echo $d;
echo "\n";
print_r(date_parse_from_format('c', $d));
Expected result:
----------------
array with data as specified in function.date-parse-from-format.php
Actual result:
--------------
Array
(
[year] =>
[month] =>
[day] =>
[hour] =>
[minute] =>
[second] =>
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 2
[errors] => Array
(
[0] => The format separator does not match
[1] => Trailing data
)
[is_localtime] =>
)
--
Edit bug report at http://bugs.php.net/?id=50199&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50199&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50199&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50199&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50199&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50199&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50199&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50199&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50199&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50199&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50199&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50199&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50199&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50199&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50199&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50199&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50199&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50199&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50199&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50199&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50199&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50199&r=mysqlcfg