Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49854 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23574 invoked from network); 3 Oct 2010 18:50:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2010 18:50:37 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:51482] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 05/06-22289-B70D8AC4 for ; Sun, 03 Oct 2010 14:50:36 -0400 Received: by wwb13 with SMTP id 13so239374wwb.11 for ; Sun, 03 Oct 2010 11:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=r99gCJb2NzWVf8n76woqwqnZ3pNV6f1FRbya7Vif9Uo=; b=sztlnx6HguxzMb+huW8/aoMtzMsqeY8AdXmr3ol/nyiDRmGgBEfkvzkJDEUCocuLWj WsmdaNUKyFm4RpqXJ8hj0Fzpxfv4CmU5xAB8fvbeaQEB3yCOIO2lEddV5zgvnKBt5+FY GjjNQQmquAk7YP7fwAh8kgXu72aMTjZawmW38= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=jdc2Ki2yeYhsb3XeqkMX49rBsrPxixYhYOALwBWsUgt/fykLARNtLpKWQlDvv3hFwN ArfhG0W6b+MsrHSdQouHXVWYFg5wGF46CuS5Abzb649SCob01YLQCqc/Ndw7FKEh6+wv xNnL+Itj7Mx1R5o5OE+wrUvkKt71LNdwLNhfc= MIME-Version: 1.0 Received: by 10.227.42.4 with SMTP id q4mr6446031wbe.156.1286131832119; Sun, 03 Oct 2010 11:50:32 -0700 (PDT) Received: by 10.227.130.164 with HTTP; Sun, 3 Oct 2010 11:50:32 -0700 (PDT) In-Reply-To: References: <4CA6885F.3040709@sugarcrm.com> Date: Sun, 3 Oct 2010 20:50:32 +0200 Message-ID: To: Derick Rethans Cc: Stas Malyshev , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] rfc2616 datetime format? From: pierre.php@gmail.com (Pierre Joye) hi, On Sun, Oct 3, 2010 at 8:32 PM, Derick Rethans 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