Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31313 invoked from network); 2 Sep 2012 20:48:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2012 20:48:13 -0000 Authentication-Results: pb1.pair.com header.from=wfitch@meetme.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=wfitch@meetme.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain meetme.com designates 74.125.149.205 as permitted sender) X-PHP-List-Original-Sender: wfitch@meetme.com X-Host-Fingerprint: 74.125.149.205 na3sys009aog111.obsmtp.com Linux 2.5 (sometimes 2.4) (4) Received: from [74.125.149.205] ([74.125.149.205:35216] helo=na3sys009aog111.obsmtp.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/27-17065-C06C3405 for ; Sun, 02 Sep 2012 16:48:13 -0400 Received: from mail-vb0-f42.google.com ([209.85.212.42]) (using TLSv1) by na3sys009aob111.postini.com ([74.125.148.12]) with SMTP ID DSNKUEPGCeZWM/O4RU4ZjtrpJV5ve+lOhr78@postini.com; Sun, 02 Sep 2012 13:48:12 PDT Received: by vbbfs19 with SMTP id fs19so5141606vbb.29 for ; Sun, 02 Sep 2012 13:48:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=tFt4fxnOSfFvWXpjQV+mqdgmEdb7fpSFlTLwMbeJHZg=; b=ohCVMEMgBv/j8Qwwfe5QoFr3vJtOGPZ85r0N2UgAIWnZU594vZsEi7I0EP0Q+MAsoI uNHmTezJ48yR/tQWr+oYJyySvT+aDc0MEVBBVY+HtJw17Zo8srHX5QTqbXegfe+TLoVa l4ndcvMvZlX1XO95iwruciU86yJK9+nTUT5SgrPSlYlEfEct+zHB3yRL3SRRj/IfcO6P 2QjGqVdX8DcDFv3JNeYQalgsztXS0wdN3T5ir6j1oA7cBK0OAEf7DQcj4/aQJkP970gW o6/PxZv5CGfyCfXA8YQDksu6Icc94XgKJSfJIyLQBPz90Jey2kKybE3OsrBvd6r6tuRO zMig== MIME-Version: 1.0 Received: by 10.52.16.212 with SMTP id i20mr8582457vdd.0.1346618888678; Sun, 02 Sep 2012 13:48:08 -0700 (PDT) Received: by 10.58.132.161 with HTTP; Sun, 2 Sep 2012 13:48:08 -0700 (PDT) X-Originating-IP: [198.228.207.21] Received: by 10.58.132.161 with HTTP; Sun, 2 Sep 2012 13:48:08 -0700 (PDT) In-Reply-To: <5043C3E9.2010105@ajf.me> References: <5042BC3C.7070208@sugarcrm.com> <50435ABE.4010308@ajf.me> <50436412.7010802@ajf.me> <5043C3E9.2010105@ajf.me> Date: Sun, 2 Sep 2012 16:48:08 -0400 Message-ID: To: Andrew Faulds Cc: Pierre Joye , internals@lists.php.net, Benjamin Eberlei , Stas Malyshev , Derick Rethans Content-Type: multipart/alternative; boundary=bcaec502d77081ec2604c8be24c6 X-Gm-Message-State: ALoCoQnoMnnvF1/kllqwrIIqzPXeoPofU3MUli+1wPiCahp7s+j17FmMHbhZi2uRS0/lxR+pO1hG Subject: Re: [PHP-DEV] RFC for Adding __toString to DateTime From: wfitch@meetme.com (Will Fitch) --bcaec502d77081ec2604c8be24c6 Content-Type: text/plain; charset=ISO-8859-1 On Sep 2, 2012 4:39 PM, "Andrew Faulds" wrote: > > On 02/09/12 18:20, Derick Rethans wrote: >> >> >> No it's not unambigious: >> >> $ php -r 'date_default_timezone_set("Europe/London"); echo date_create()->format(DateTime::ISO8601), "\n";' >> 2012-09-02T18:17:36+0100 >> >> $ php -r 'date_default_timezone_set("Africa/Niamey"); echo date_create()->format(DateTime::ISO8601), "\n";' >> 2012-09-02T18:19:05+0100 >> >> vs: >> >> $ php -r 'date_default_timezone_set("Africa/Niamey"); echo date_create("2012-12-31")->format(DateTime::ISO8601), "\n";' >> 2012-12-31T00:00:00+0100 >> ^^^^^ >> >> $ php -r 'date_default_timezone_set("Europe/London"); echo date_create("2012-12-31")->format(DateTime::ISO8601), "\n";' >> 2012-12-31T00:00:00+0000 >> ^^^^^ > > I'm a little confused as to what is going on here, but ISO8601 has a UTC format, YYYY-MM-DDTHH:MM:SSZ. I think the issue on most minds is the TZ aspect. I agree with the others on using UTC. I also think ill suggest a different approach to this. >> >> cheers, >> Derick > > > > -- > Andrew Faulds > http://ajf.me/ > --bcaec502d77081ec2604c8be24c6--