Req #74080 [Opn->Csd]: Provide an RFC7231 date time format
| From: | krakjoe@php.net | Date: | Mon, 17 Apr 2017 07:10:11 +0000 |
| Subject: | Req #74080 [Opn->Csd]: Provide an RFC7231 date time format | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-208611@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74080&edit=1
ID: 74080
Updated by: krakjoe@php.net
Reported by: neclimdul at gmail dot com
Summary: Provide an RFC7231 date time format
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: Date/time related
PHP Version: 7.1.1
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of git@duncanc.co.uk
Revision: http://git.php.net/?p=php-src.git;a=commit;h=618d97962a8ac59d981c8307cc704790f46090c8
Log: Fixed bug #74080 Add datetime constant for RFC7231
Previous Comments:
------------------------------------------------------------------------
[2017-02-10 19:28:49] neclimdul at gmail dot com
Apologies if this was already submitted somewhere. I thought I had but I searched all over and
couldn't find it.
------------------------------------------------------------------------
[2017-02-10 19:27:18] neclimdul at gmail dot com
Description:
------------
There are a number of useful constants for formatting dates in PHP which cover most of the formats
used on the internet. Unfortunately there is one missing format which can be pretty important, the
one defined by RFC2616.
All HTTP headers should follow this format. Because its a subset of RFC1123 that format is commonly
substituted in PHP. This generally will work with permissive systems, however because the format
provided by RFC1123 is system dependent it can provide strings that with more strict proxies will
fail to parse. Generally that is UTC instead of the required GMT timezone. And old php.net
documentation comment mentions this as well http://php.net/gmdate#25031.
Because of this Drupal has a custom constant to be used in headers https://www.drupal.org/node/1918820
However because of PHP's audience I think it would be a handy feature for everyone to have the
additional format constant.
RFC2616 is actually obsoleeted by RFC7231 in 2014 so I would use this name as Drupal did but the
format is the same.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3
http://tools.ietf.org/html/rfc7231#section-7.1.1.1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74080&edit=1