Re: [RFC] Remove the date.timezone warning

From: Date: Tue, 27 Jan 2015 04:32:51 +0000
Subject: Re: [RFC] Remove the date.timezone warning
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-81199@lists.php.net to get a copy of this message
On Jan 27, 2015 11:25 AM, "Yasuo Ohgaki" <yohgaki@ohgaki.net> wrote: > > Hi Kalle and all, > > On Tue, Jan 27, 2015 at 12:56 PM, Kalle Sommer Nielsen <kalle@php.net> > wrote: > > > I think the warning is fair as it is, if it is annoying for small use > > cases like on the CLI then simply: php -d date.timezone=UTC -r "echo > > date('H:i:s');" or the dirty way by using the silent operator. It used > > to be a notice prior 5.3 I think or something. > > > > While I do agree that most applications should be using UTC, which > > should be set by default we sometimes need to tell userland the hard > > way how things work, and/or what they should care about, like the > > E_WARNING, E_CORE_ERROR, E_DEPRECATED for old php.ini settings. > > > > -1 for removing it from my side. > > > > I can understand your argument. > Perhaps, we may reconsider to introduce E_DEBUG/E_USER_DEBUG for these > purposes. > There are many functions, e.g. file related, that I feel E_WARNING is > excessive. I do not have a strong opinion on that. So keep it or make it UTC default but please do not add yet another warning/notice/whatever. Also, setting a timezone is not about Dev or other fancy tasks, it is about making datetime processing right. If anything I would enforce the default at configure/build time. So it at least gets the correct one from a host point of view. Cheers, Pierre

« previous php.internals (#81199) next »