为了账号安全,请及时绑定邮箱和手机立即绑定

“Date():依赖系统的时区设置…是不安全的”

“Date():依赖系统的时区设置…是不安全的”

PHP
温温酱 2019-07-10 10:48:34
“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: 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 in /filelocation right here/system/libraries/Log.php on line 86Warning: 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 in /filelocation right here/system/libraries/Log.php on line 99<div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;"><h4>A PHP Error was encountered</h4>
查看完整描述

3 回答

?
胡子哥哥

TA贡献1825条经验 获得超6个赞

在您的index.php档案。我第一次发现这一点是因为我把我的应用程序从我的XAMPP服务器到Apache 2.2和PHP 5.4.。

我建议你用你的index.php文件,而不是php.ini档案。

if( ! ini_get('date.timezone') ){
    date_default_timezone_set('GMT');}


查看完整回答
反对 回复 2019-07-10
  • 3 回答
  • 0 关注
  • 801 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信