|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-09-29 17:33 UTC] bwhitehead at tableausoftware dot com
[2013-11-27 17:44 UTC] derick@php.net
[2013-11-27 17:44 UTC] derick@php.net
[2013-11-27 17:46 UTC] derick@php.net
[2013-11-27 22:01 UTC] derick@php.net
[2013-11-27 22:01 UTC] derick@php.net
-Status: Open
+Status: Closed
[2013-11-27 22:01 UTC] derick@php.net
[2013-11-27 22:01 UTC] derick@php.net
[2013-11-27 22:01 UTC] derick@php.net
[2013-11-28 08:30 UTC] ab@php.net
[2014-05-06 15:51 UTC] errol dot sayre at gmail dot com
[2014-10-07 23:16 UTC] stas@php.net
[2014-10-07 23:27 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 07:00:01 2025 UTC |
Description: ------------ The class DateTime is supposed to handle date strings like used for cookie expiration dates. It explicitly defines the format DateTime::COOKIE but fails to parse it. Test script: --------------- <?php $date = DateTime::createFromFormat(DateTime::COOKIE, "Mon, 21-Jan-2041 15:24:52 GMT"); print_r($date); ?> Same goes for <?php $date = date_parse_from_format(DateTime::COOKIE, "Mon, 21-Jan-2041 15:24:52 GMT"); print_r($date); ?> Expected result: ---------------- Something with a date instead of NULL O.o Actual result: -------------- Array ( [year] => 2020 [month] => 1 [day] => 21 [hour] => 41 [minute] => 15 [second] => 24 [fraction] => [warning_count] => 1 [warnings] => Array ( [25] => The parsed time was invalid ) [error_count] => 4 [errors] => Array ( [16] => Unexpected data found. [22] => The timezone could not be found in the database [25] => Trailing data ) [is_localtime] => 1 [zone_type] => 0 )