Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49870 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27018 invoked from network); 5 Oct 2010 06:51:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Oct 2010 06:51:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.170 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.170 mail-wy0-f170.google.com Received: from [74.125.82.170] ([74.125.82.170:50690] helo=mail-wy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/71-17975-60BCAAC4 for ; Tue, 05 Oct 2010 02:51:51 -0400 Received: by wyg36 with SMTP id 36so339912wyg.29 for ; Mon, 04 Oct 2010 23:51:48 -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=es/BO6Obi0vkHJIF6jdFOx8fWxpT5WfJRgAFMtj/oZ0=; b=ELxlcHBcqWlKmq9fytx7KOM2w94ksTRqfDztNW9c+KEiMWlVuCBEGUzLJI0SHc3usJ vOsK4yfY6KSZxL41p36fLxONQMrIZTmzqGrbbWw5ja7cN3YjvTSeHYf/FENnUo4Oa13r vp5FyhotH/KvLhYMSde9MvL+nv+LVT2KwD2kc= 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=tYHeDrgiDx2SHnDxLLvJUotC5+NL4SdzbNbbKKQlzxlqnkQAMNVxQGtvqIlV0+6Ofs CS7pZR0dHbAxrD3Qp3l4ImpXnTIS75AGSd9hRaWct7/5XVJ/PG0AdDVQNYxvGOSUNCfh eWlwY1ngnCKELMW9evkmhU1eyf577qdxlvc5c= MIME-Version: 1.0 Received: by 10.227.146.4 with SMTP id f4mr9448036wbv.14.1286261507875; Mon, 04 Oct 2010 23:51:47 -0700 (PDT) Received: by 10.227.130.164 with HTTP; Mon, 4 Oct 2010 23:51:47 -0700 (PDT) In-Reply-To: <690cf2754d5d987eb05230bb0705f05e.squirrel@www.l-i-e.com> References: <4CA6885F.3040709@sugarcrm.com> <4CA91151.2010104@sugarcrm.com> <690cf2754d5d987eb05230bb0705f05e.squirrel@www.l-i-e.com> Date: Tue, 5 Oct 2010 08:51:47 +0200 Message-ID: To: Richard Lynch Cc: Stas Malyshev , Derick Rethans , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] rfc2616 datetime format? From: pierre.php@gmail.com (Pierre Joye) On Tue, Oct 5, 2010 at 5:48 AM, Richard Lynch wrote: > On Sun, October 3, 2010 6:27 pm, Stas Malyshev wrote: >>> 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. >> >> I'm not sure what integers have to do with it? The constants define >> date >> formats that are in common use, RFC2616 is one of the commonest on the >> web and we don't have a constant for it... > > I'm not sure that using 1 for RFC822, 2 for RFC884, ... would have > been much better, really... it is easily detectable and cannot be confused with a manually (by the user) defined format string. It is also fully BC, even when a format is updated. Format string requiring post/pre processing (like convert to GMT and then restore the TZ) can benefit from the easy detection without breaking BC. Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org