Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67530 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36623 invoked from network); 26 May 2013 13:17:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 May 2013 13:17:55 -0000 Authentication-Results: pb1.pair.com header.from=tstarling@wikimedia.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tstarling@wikimedia.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain wikimedia.org designates 208.80.152.186 as permitted sender) X-PHP-List-Original-Sender: tstarling@wikimedia.org X-Host-Fingerprint: 208.80.152.186 mchenry.wikimedia.org Received: from [208.80.152.186] ([208.80.152.186:36022] helo=mchenry.wikimedia.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/04-32733-18B02A15 for ; Sun, 26 May 2013 09:17:54 -0400 Received: from [2620:0:860:2:219:b9ff:fedd:86eb] (port=39265 helo=sanger.wikimedia.org) by mchenry.wikimedia.org with esmtp (Exim 4.69) (envelope-from ) id 1Ugapa-0003h1-TA; Sun, 26 May 2013 13:17:50 +0000 Received: from ip4daa59e3.direct-adsl.nl ([77.170.89.227]:60381 helo=[192.168.2.23]) by sanger.wikimedia.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1UgapZ-0008V3-W9; Sun, 26 May 2013 13:17:50 +0000 Message-ID: <51A20B7B.1090302@wikimedia.org> Date: Sun, 26 May 2013 15:17:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Lester Caine CC: PHP internals References: <51A092FC.4010700@wikimedia.org> <51A1AF3E.5000704@sugarcrm.com> <51A1F701.4080706@lsces.co.uk> In-Reply-To: <51A1F701.4080706@lsces.co.uk> X-Enigmail-Version: 1.4.6 OpenPGP: id=BF976370 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] date.timezone E_WARNING -- Really necessary? What's the rationale? From: tstarling@wikimedia.org (Tim Starling) On 26/05/13 13:50, Lester Caine wrote: > Richard Quadling wrote: >> As more and more site/services are being hosted in the cloud, allowing >> requests to be handled locally geographically, in different >> timezones, does >> it make ANY sense in setting a timezone at all other than UTC? > > This is something I have been saying all along. The whole thing is > broken anyway since you have no idea what time-zone a USER is > accessing from since the browser bodge only provides a current time > offset. Until a user logs into a site and provides the data of their > current daylight saving 'location' anything else is a guess. If you > are assuming a server is in a single time-zone, then it makes even > less sense to use anything other than UTC and ignore timezones > altogether? > If you're writing a CLI script which produces timestamped log lines on stdout, it probably makes sense to use the TZ environment variable, and to fall back to /usr/share/zoneinfo if it is unset, like localtime(). If you're writing a web app which writes timestamped log lines to a local file, it probably makes sense to use whatever timezone is specified in /usr/share/zoneinfo, for consistency with syslogd etc. For timestamps sent to web app end users, you probably want it to be user configurable with UTC as the default, or use some local time for websites with geographically limited interest. It's likely that the timezone of maximum user interest will be different from the server timezone, so it doesn't really make sense to couple the two. In none of these cases does it make sense to require the sysadmin to set a timezone in php.ini before even being able to use the app, so I don't understand why that is the policy chosen by PHP. But like I said in my original post, I really don't mind: thank you for writing ext/datetime, please continue annoying users to whatever extent you see fit. -- Tim Starling