Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62696 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52940 invoked from network); 2 Sep 2012 23:04:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Sep 2012 23:04:19 -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.149 as permitted sender) X-PHP-List-Original-Sender: wfitch@meetme.com X-Host-Fingerprint: 74.125.149.149 na3sys009aog123.obsmtp.com Linux 2.5 (sometimes 2.4) (4) Received: from [74.125.149.149] ([74.125.149.149:52203] helo=na3sys009aog123.obsmtp.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1B/9B-17065-FE5E3405 for ; Sun, 02 Sep 2012 19:04:16 -0400 Received: from mail-vb0-f42.google.com ([209.85.212.42]) (using TLSv1) by na3sys009aob123.postini.com ([74.125.148.12]) with SMTP ID DSNKUEPl7Y4qs+E+cO2hRoucC4ZSAetVV+ze@postini.com; Sun, 02 Sep 2012 16:04:16 PDT Received: by vbbfs19 with SMTP id fs19so5196462vbb.29 for ; Sun, 02 Sep 2012 16:04:12 -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=/BiH4kNXZ0oCLI3+XTxy36LBnP/IZJ3FiinISGFpcNk=; b=UIQvftPQbZTbAZNW6YuGhb1RTaoyFfENVTwFfzwLq2TKXs0NU499rIfvELePHOgTpO 1H+G4OyuwVdn6+c3RemcrPtwN3Zx5dnYRXW/nHyUr3oItFj8j84c88EyyhfjyPIBApxo lLFRXIjyqRQ+iaO4mSH3uNO/fwnPWnelDBLQaO77CFA8Cp1ltxXFptJtxgNerKOyaP3D jTmVrn2NfLjDrmvmpSQubdhhw2TruDDhFHT3L8WjKZl3Z95ub1lwCMUMUYMyvGFC2G3k 30RfwDl9TiHJsXddlJQK89ssTvFfCZ7nFn4hQWkp12upgNLOcxdv95NkzRcxE33ignb9 Zk+w== MIME-Version: 1.0 Received: by 10.58.79.178 with SMTP id k18mr11268710vex.3.1346627052315; Sun, 02 Sep 2012 16:04:12 -0700 (PDT) Received: by 10.58.132.161 with HTTP; Sun, 2 Sep 2012 16:04:12 -0700 (PDT) X-Originating-IP: [198.228.207.21] Received: by 10.58.132.161 with HTTP; Sun, 2 Sep 2012 16:04:12 -0700 (PDT) In-Reply-To: <5043D8C0.3020802@lsces.co.uk> References: <5042BC3C.7070208@sugarcrm.com> <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> Date: Sun, 2 Sep 2012 19:04:12 -0400 Message-ID: To: Lester Caine Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7b5da23d19242604c8c00bad X-Gm-Message-State: ALoCoQkuILHFpJ4edBbny92qYixhDb5ixSDa4rWw4tVFbnxhZYcuC6zX3D4gjpMBGMOpAR1sVnvd Subject: Re: [PHP-DEV] RFC for Adding __toString to DateTime From: wfitch@meetme.com (Will Fitch) --047d7b5da23d19242604c8c00bad Content-Type: text/plain; charset=ISO-8859-1 On Sep 2, 2012 6:08 PM, "Lester Caine" wrote: > > Peter Cowburn wrote: >> >> Finally, why should "echo $datetime;" be expected to work at all, >> since 95% of the time it's only going to be echo'd plain like that for >> debugging purposes as we'll never pick the "right" format to use in >> everyone's code. When needing to set the "default" (read: >> per-instance) string format with something like setToStringFormat() or >> whatever, that becomes*more* work than just calling format(). > > > Hopefully Will now understands just how problematic his request is, and why it has not been implemented as yet. I'm with you but for a slightly different reason. I never run anything but UTC on the server. So I'm only displaying anything other than UTC when handling a client view of the data. So I would normally be calling format with the client timezone data. It is problematic because that is what we choose to make it. Right now, a catchable fatal error is produced. That is problematic. ISO8601 is not lossy nor is UTC. It can be taken by any other language and converted based on the format itself. We have standards for a reason. I agree that changing that should not be allowed. I will remove the set/get pattern functions and only print a standard format. Printing an ISO standard format, which includes the TZ based on UTC, or even the UTC format itself is a better solution than a catchable fatal error. > > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=contact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk > Rainbow Digital Media - http://rainbowdigitalmedia.co.uk > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > --047d7b5da23d19242604c8c00bad--