相关疑难解决方法(0)

"date():依靠系统的时区设置是不安全的......"

当我请求在服务器上将PHP版本从5.2.17 更新到PHP 5.3.21 时,我收到此错误.

<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Warning</p>
<p>Message:  date(): 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 'America/New_York' for 'EDT/-4.0/DST' instead</p>
<p>Filename: libraries/Log.php</p>
<p>Line Number: 86</p>

</div>
Warning: …
Run Code Online (Sandbox Code Playgroud)

php timezone

351
推荐指数
10
解决办法
55万
查看次数

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...
Run Code Online (Sandbox Code Playgroud)

我在php.ini中设置了默认时区

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = …
Run Code Online (Sandbox Code Playgroud)

php timezone symfony

77
推荐指数
3
解决办法
12万
查看次数

标签 统计

php ×2

timezone ×2

symfony ×1