hi, On Sun, Oct 3, 2010 at 8:32 PM, Derick Rethans <der...@php.net> wrote: > 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.
It looks like a sub optimal choice to have used string constants instead of integer. However it could be still possible to define new constants as numeric. It is then possible to do whatever needs to be done as post or pre ops for the respective constants. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php