Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42111 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60841 invoked from network); 5 Dec 2008 06:29:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2008 06:29:01 -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.26.184 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 213.123.26.184 c2beaomr06.btconnect.com Received: from [213.123.26.184] ([213.123.26.184:28688] helo=c2beaomr06.btconnect.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0E/DB-20960-B2AC8394 for ; Fri, 05 Dec 2008 01:29:00 -0500 Received: from [10.0.0.150] (host81-138-11-136.in-addr.btopenworld.com [81.138.11.136]) by c2beaomr06.btconnect.com (MOS 3.8.6-GA) with ESMTP id AVJ02065; Fri, 5 Dec 2008 06:28:56 GMT Message-ID: <4938C8FB.6010509@lsces.co.uk> Date: Fri, 05 Dec 2008 06:23:55 +0000 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.8.1.18) Gecko/20081112 SeaMonkey/1.1.13 MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Junkmail-Status: score=10/50, host=c2beaomr06.btconnect.com X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A0B0205.4938CA28.022D,ss=1,fgs=0, ip=10.0.0.150, so=2007-10-30 19:00:17, dmn=5.7.1/2008-09-02 X-Junkmail-IWF: false Subject: Upgrading to internal DateTime From: lester@lsces.co.uk (Lester Caine) 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. 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. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/lsces/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