Re: rfc2616 datetime format?
| From: | Derick Rethans | Date: | Sun, 03 Oct 2010 18:32:21 +0000 |
| Subject: | Re: rfc2616 datetime format? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-49853@lists.php.net to get a copy of this message | ||
On Fri, 1 Oct 2010, Stas Malyshev wrote:
> Any reason why DateTime doesn't have a constant for RFC2616 (HTTP) date
> format? RFC1123 and 'r' are _almost_ there but 2616 explicitly states TZ must
> be "GMT" and 1123 format produces +0000 instead.
The reason is that in order to format a DateTime object as GMT, it needs
to be converted to GMT... and you can't simply do that with just a
constant consisting of a string of format characters.
cheers,
Derick
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug