From: mail at henkbulder dot nl
Operating system:
PHP version: 5.3.1
PHP Bug Type: Date/time related
Bug description: date_parse_from_format does not parse after 'O' or 'Z' -
format
Description:
------------
date_parse_from_format doesn't seem to parse anything after (at the right
hand of) a timezone-offset ('O' or 'Z').
I shuffled the date-string (and format-strings accordingly) around a few
times, and the only way to properly fill the array seems to be putting
timezone-offset at the end of the string.
Reproduce code:
---------------
$testdate = "Sat Feb 20 +0000 15:37:44 2010";
$createdarr = date_parse_from_format("D M d O G:i:s Y", $testdate);
print_r($createdarr);
Expected result:
----------------
Array
(
[year] => 2010
[month] => 2
[day] => 20
[hour] => 15
[minute] => 37
[second] => 44
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 0
[errors] => Array
(
)
[is_localtime] => 1
[zone_type] => 1
[zone] => 0
[is_dst] =>
)
Actual result:
--------------
Array
(
[year] =>
[month] => 2
[day] => 20
[hour] =>
[minute] =>
[second] =>
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 1
[errors] => Array
(
[30] => Data missing
)
[is_localtime] => 1
[zone_type] => 1
[zone] => 0
[is_dst] =>
)
--
Edit bug report at http://bugs.php.net/?id=51107&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51107&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51107&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51107&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51107&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51107&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51107&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51107&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51107&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51107&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51107&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51107&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51107&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51107&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51107&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51107&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51107&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51107&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51107&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51107&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51107&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51107&r=mysqlcfg