Symfony2 和 date_default_timezone_get() - 依赖系统的时区设置是不安全的
我有一个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
这很奇怪。
任何想法?谢谢。