Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62740 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70940 invoked from network); 3 Sep 2012 13:25:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2012 13:25:15 -0000 Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:34785] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/1A-20751-ABFA4405 for ; Mon, 03 Sep 2012 09:25:14 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 2919DDE13E; Mon, 3 Sep 2012 14:25:11 +0100 (BST) Date: Mon, 3 Sep 2012 14:25:11 +0100 (BST) X-X-Sender: derick@whisky.home.derickrethans.nl To: Will Fitch cc: Lars Strojny , Pierre Joye , Ryan McCue , internals@lists.php.net In-Reply-To: Message-ID: References: <5043C3E9.2010105@ajf.me> <5043C5AF.3060701@ajf.me> <5043C74C.8020400@ajf.me> <5043D8C0.3020802@lsces.co.uk> <5044715E.3050504@rotorised.com> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] RFC for Adding __toString to DateTime From: derick@php.net (Derick Rethans) On Mon, 3 Sep 2012, Will Fitch wrote: > On Mon, Sep 3, 2012 at 8:09 AM, Lars Strojny wrote: > > > Additionally to what Ryan proposed, microseconds should be part of it > > (which ISO allows). So, here we go: > > > > 2012-09-02T18:17:36.12345+0100 (Europe/London) > > Hi Lars - there wouldn't be a need for the offset if the string > provides the timezone name. And you are wrong again: setTimeZone( new DateTimeZone( 'Europe/London' ) ); echo $d->format( 'Y-m-d H:i:s (e)' ), "\n"; $d = date_create( "@1351388700" ); // one hour later $d->setTimeZone( new DateTimeZone( 'Europe/London' ) ); echo $d->format( 'Y-m-d H:i:s (e)' ), "\n"; outputs: 2012-10-28 01:45:00 (Europe/London) 2012-10-28 01:45:00 (Europe/London) And it's clearly not the same moment in time... > Parsing this wouldn't be an issue, It is an issue - there is even an RFC (that I still need to implement) for it: https://wiki.php.net/rfc/datetime_and_daylight_saving_time cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine