【发布时间】:2014-01-11 15:26:54
【问题描述】:
我有一个 Symfony2 项目。我今天将我的 php 更新到 5.5.7,从那时起,我得到了
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. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in...
我在 php.ini 中设置了默认时区
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Europe/Paris";
为了确保这是好的 php.ini,我正在检查
phpinfo();
我要到达的路径就是我正在修改的路径:
/usr/local/php5.5.7/lib
但在那里,我看到了
Default timezone UTC
这很奇怪。
有什么想法吗?谢谢。
【问题讨论】:
-
你能确认一下你改过的php.ini的完整路径吗
-
如果您在 symfony 控制台中收到此警告,那么您还需要在 cli/php.ini 中进行更改