Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:49871 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30942 invoked from network); 5 Oct 2010 07:35:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Oct 2010 07:35:08 -0000 Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 213.123.20.132 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.20.132 c2bthomr14.btconnect.com Received: from [213.123.20.132] ([213.123.20.132:29989] helo=mail.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/20-29752-A25DAAC4 for ; Tue, 05 Oct 2010 03:35:07 -0400 Received: from host81-138-11-136.in-addr.btopenworld.com (EHLO _10.0.0.4_) ([81.138.11.136]) by c2bthomr14.btconnect.com with ESMTP id ADG72216; Tue, 05 Oct 2010 08:34:08 +0100 (BST) Message-ID: <4CAAD4EF.9040907@lsces.co.uk> Date: Tue, 05 Oct 2010 08:34:07 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/2.0.6-2.3 SeaMonkey/2.0.6 MIME-Version: 1.0 To: PHP Internals References: <4CA6885F.3040709@sugarcrm.com> <4CA910FD.1040900@sugarcrm.com> In-Reply-To: <4CA910FD.1040900@sugarcrm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mirapoint-IP-Reputation: reputation=Fair-1, source=Queried, refid=tid=0001.0A0B0302.4CAAD4EF.01BA, actions=tag X-Junkmail-Status: score=10/50, host=c2bthomr14.btconnect.com X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A0B020A.4CAAD528.0046,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=single engine X-Junkmail-IWF: false Subject: Re: [PHP-DEV] rfc2616 datetime format? From: lester@lsces.co.uk (Lester Caine) Stas Malyshev wrote: >> 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. > > I see what you mean and it makes sense, having constant may imply that > you can use it with any date and get proper result... But RFC2616 is the > one of the most used formats on the Web - actually, the format that is > called COOKIE is not the one that should be used in cookies - RFC2616 > should be used instead. COOKIE one uses T, which may or may not be GMT, > depending on the date and local system settings. Maybe we should have > proper RFC format too, accompanied with appropriate warning that you > should use it with GMT dates (or gmdate())? There are a number of competing requirements from dates, relating to the core problem of not ACTUALLY having a usable flag from remote users as to their actual time zone ( DST information not supplied by browser ;) ). So the only thing that can be guaranteed is a GMT date/time, and it is that which I now use in the database for ALL stored timestamps. Displaying that information as a 'local' time is rather hit and miss depending on how you identify 'local', so timezone while being bundled into the 'date', is a totally independent element and often while the offset NOW may be right, displaying GMT time for an earlier 'stamp' may be an hour wrong if the user DST can not be identified? If your application is using date/times that are not gmt based, then you have to then manage the problem of comparing times which may have an hour difference on the day following a DST change. but most sites seem to assume that the server local time is an acceptable base, which then DOES cause a problem when supplying time information to remote users? SO while the 'format' of the printout is well documented, converting the supplied data is a separate problem? -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php