Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42115 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40180 invoked from network); 5 Dec 2008 12:07:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2008 12:07:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=jared.williams1@ntlworld.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jared.williams1@ntlworld.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ntlworld.com designates 81.103.221.49 as permitted sender) X-PHP-List-Original-Sender: jared.williams1@ntlworld.com X-Host-Fingerprint: 81.103.221.49 mtaout03-winn.ispmail.ntl.com Solaris 10 (beta) Received: from [81.103.221.49] ([81.103.221.49:41476] helo=mtaout03-winn.ispmail.ntl.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/AA-20960-36919394 for ; Fri, 05 Dec 2008 07:07:01 -0500 Received: from aamtaout03-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20081205120653.DBZT1691.mtaout03-winn.ispmail.ntl.com@aamtaout03-winn.ispmail.ntl.com>; Fri, 5 Dec 2008 12:06:53 +0000 Received: from p2 ([82.0.125.123]) by aamtaout03-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20081205120652.QIZM2093.aamtaout03-winn.ispmail.ntl.com@p2>; Fri, 5 Dec 2008 12:06:52 +0000 To: "'Lester Caine'" , Date: Fri, 5 Dec 2008 12:07:31 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <4938C8FB.6010509@lsces.co.uk> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 Thread-Index: AclWouE3L4oTL3UbRfiDAPFRxO/0xQALmPkg Message-ID: <20081205120652.QIZM2093.aamtaout03-winn.ispmail.ntl.com@p2> X-Cloudmark-Analysis: v=1.0 c=1 a=Of9QBoTrou8A:10 a=kznBCecYt_YA:10 a=67BIL_jfAAAA:8 a=zVwBPP9_rkJOVZ1ItJkA:9 a=ptO9z9pawtBJhzIPtjAA:7 a=bpHrZ7bpWyKsbB34EJVmr9a4FMcA:4 a=gJcimI5xSWUA:10 Subject: RE: [PHP-DEV] Upgrading to internal DateTime From: jared.williams1@ntlworld.com ("Jared Williams") References: <4938C8FB.6010509@lsces.co.uk> > -----Original Message----- > From: Lester Caine [mailto:lester@lsces.co.uk] > Sent: 05 December 2008 06:24 > To: internals@lists.php.net > Subject: [PHP-DEV] Upgrading to internal DateTime > > OK I spent yesterday working trough some of the > idiosyncrasies of DateTime and having had a sleep I've > finished off this morning. > > First question. > Why are there two different formats for dates with date > creation using one format and everything else using strftime > formatting? > ( Slipping a date through DateTime and returning it DATE_W3C > seems to be adding the correct daylight saving details so far > and allowing ADOdb date to work ) > > Second question. > What is the current situation on translating dates? I've > tried several ways of using setlocale, but at present I've > not been able to get anything other than English out of the code. Intl extension has classes/methods for translating dates. http://www.php.net/manual/en/class.intldateformatter.php . > > Third question > In order to get things working I've ended up with > date_default_timezone_set() and haven't needed to use > DateTimeZone at all ( other than to get a list for the user > to select from ). Internally we are working UTC normalized, > and then displaying with the user offset if they select > 'local'. IS the correct thing to be setting the default for > each user? I suspect yes since previous code has always had > to fight the server time setting changing things. Jared