Re: [RFC] Remove the date.timezone warning
| From: | Derick Rethans | Date: | Tue, 27 Jan 2015 11:22:35 +0000 |
| Subject: | Re: [RFC] Remove the date.timezone warning | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-81232@lists.php.net to get a copy of this message | ||
On Tue, 27 Jan 2015, Nikita Popov wrote:
> On Tue, Jan 27, 2015 at 7:40 AM, Matteo Beccati <php@beccati.com> wrote:
>
> > On 27/01/2015 01:34, Bob Weinand wrote:
> >
> >> Hey,
> >>
> >> I'd like to request removal of the date.timezone warning.
> >>
> >> Here is the RFC:
> >> https://wiki.php.net/rfc/date.timezone_warning_removal
> >> <
> >>
> >> https://wiki.php.net/rfc/date.timezone_warning_removal>
> >>
> >
> > The warning is certainly annoying, but making it default to UTC or a wrong
> > timezone because the right one can't be guessed is a major WTF.
> >
> > Ideally the initial setup of php.ini could be handled by the distro
> > package system, if it's not already?
>
> Isn't UTC the only "right" default timezone there is for a server?
This is not a server setting, this is a PHP application level setting.
And there, UTC is not the "right" default choice.
> Everything else being there to simplify implementation of websites
> which anticipate a geographically narrow target audience?
>
> Anyway, I absolutely don't get why out of all the hundreds of ini
> settings that we have, some of them vastly more important than setting
> a timezone (like display_errors or error_reporting - newbies trip over
> these much more often), the only one we actually require you to
> specify is date.timezone. That seems very disproportional.
But easily solved by distributions. Debian could easily stick the
following in a post-install hook to fix it:
echo -n 'date.timezone=' > /etc/php/config.d/date.ini
cat /etc/timezone >> /etc/php/config.d/date.ini
cheers,
Derick