Re: date.timezone E_WARNING -- Really necessary? What's the rationale?

From: Date: Fri, 24 May 2013 19:18:54 +0000
Subject: Re: date.timezone E_WARNING -- Really necessary? What's the rationale?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
> "If none of the above succeed, date_default_timezone_get() will return a
> default timezone of UTC."

It will still raise a warning, by the way. This is horrible behavior;
I recommend the following:

    date_default_timezone_set(ini_get('date.timezone') ?: 'UTC');

This is basically what date_default_timezone_get does as of PHP 5.4
except there is no warning.


Thread (70 messages)

« previous php.internals (#67504) next »