I'm getting the error that many have seen when upgrading from PHP 5.2.9 to PHP 5.3.0, but oddly, the error is showing up as the result of a reference to a $_GET variable, not anything to do with a timezone setting.
Here's the error:
Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the开发者_开发问答 date_default_timezone_set() function.
Has anyone else seen this same thing, and found a way to resolve it without simply changing the error_reporting level?
Thanks.
I also had that error, when I upgraded from PHP 5.2 to PHP 5.3. I solved that by setting the corresponding server timezone in my php.ini:
date.timezone = "Europe/Berlin"
Following http://php.net/manual/de/function.date-default-timezone-set.php, since PHP 5.3 a E_WARNING
is thrown if the timezone was not set.
I had to use lower case for "PHP Version 5.5.3-1ubuntu2.1":
date.timezone = "america/new_york"
精彩评论