相关疑难解决方法(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万
查看次数

`[Exception] DateTime :: __ construct():`依赖系统的时区设置是不安全的

我正在使用codeception(bdd)进行测试但却出错

[Exception]                                                                                                
  DateTime::__construct(): 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 
Run Code Online (Sandbox Code Playgroud)

任何这些
方法,你仍然得到这个警告,你很可能拼写错误的时区标识符.

我们选择Europe/HelsinkiEEST/3.0/DST;

我可不可以做?

php timezone exception codeception

17
推荐指数
2
解决办法
3万
查看次数

标签 统计

php ×2

timezone ×2

codeception ×1

exception ×1