Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62728 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49576 invoked from network); 3 Sep 2012 11:57:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Sep 2012 11:57:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:61430] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 85/95-20751-62B94405 for ; Mon, 03 Sep 2012 07:57:27 -0400 Received: by iamm10 with SMTP id m10so8629883iam.29 for ; Mon, 03 Sep 2012 04:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=z9zps0EYzpUPszM5aVy6G56y7NQfYuJ+fINdqVSeLf4=; b=mG2uFuZ7vPdS39Ra3ePZ7DJOsVErYU6yqIWQNGLAbKOjHJ1pi0DO3+5p7gPFLAadVD w9MG5cFSl6iIpNxpZ4Ozs0WmP9CMY/elkgD++LtURSE5nIO/jnToEeNvPgRKXQ6+04m6 ZgIKIXRYVPG+kqhYXYg5l4XVuaXPyI5woeOnwlP5DHnVGm+4pOV4i/TH5ZuE7T0VTloq aNZ939NtC+U0PISPx+vCHl0hdbSDUaAnC9Yzv5e99SxQ7Oc96DAy4ld7jaVhakuJkvcC V+SJNpQ44uBEebpx6I+mEbyUEhG+GW6+g8vNhsa0PU9AKiGeJvzUvB0DWUidpRIn/0rQ i89g== MIME-Version: 1.0 Received: by 10.50.219.161 with SMTP id pp1mr10506579igc.19.1346673444394; Mon, 03 Sep 2012 04:57:24 -0700 (PDT) Received: by 10.64.60.40 with HTTP; Mon, 3 Sep 2012 04:57:24 -0700 (PDT) In-Reply-To: References: <50435ABE.4010308@ajf.me> <50436412.7010802@ajf.me> <5043C3E9.2010105@ajf.me> <5043C5AF.3060701@ajf.me> <5043C74C.8020400@ajf.me> <5043D8C0.3020802@lsces.co.uk> <5044715E.3050504@rotorised.com> Date: Mon, 3 Sep 2012 13:57:24 +0200 Message-ID: To: Will Fitch Cc: Ryan McCue , internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] RFC for Adding __toString to DateTime From: pierre.php@gmail.com (Pierre Joye) hi Will, On Mon, Sep 3, 2012 at 1:51 PM, Will Fitch wrote: > On Mon, Sep 3, 2012 at 4:59 AM, Ryan McCue wrote: > >> As far as I can tell, there's no standard which uses the Olson database >> to specify the timezone, so we'd have to create one. >> >> What about ISO8601 with the Olson timezone suffixed? >> >> 2012-09-02T18:17:36+0100 (Europe/London) >> 2012-09-02T18:19:05+0100 (Africa/Niamey) >> > > Disagree - The ISO8601 provides a good *string* representation of the > object. If you want every aspect of the entire object, including the > properties which are also objects, serialize it. I don't think you will ever get a consensus on that. The reason is that this case falls in the same fall than the timezone itself (but per instance of an object instead of globally). I'd to suggest to force the definition of a format using the setStringFormat (or whatever will be the name of this function). __toString will then fail if no format has been set, warning and returns NULL (f.e.). Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org