php警告:strtotime()错误

Kav*_*abu 4 php string wordpress joomla phpmyadmin

我已将joomla和wordpress文件从旧服务器更改为新服务器。在前端和管理端,它的工作没有任何错误。但是在数据库(phpmyadmin)部分中,它显示了一些类似这样的警告消息。

Warning: strtotime() [function.strtotime]: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/db_info.inc.php on line 88

Warning: strftime() [function.strftime]: 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 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1483
Run Code Online (Sandbox Code Playgroud)

您能否提出建议,如何隐藏这些警告消息?

提前致谢。

Ale*_*rek 5

它们确实表明您是只想隐藏错误消息还是要解决问题?

在新服务器上,您应该date.timezonephp.ini文件中找到已注释掉的设置。在这里,您必须指定服务器所在的时区。例如,我的服务器位于德国,因此Europe/Berlin在这里使用:

date.timezone = Europe/Berlin
Run Code Online (Sandbox Code Playgroud)

您可以在此处找到受支持的时区的完整列表:

http://www.php.net/manual/en/timezones.php

更改此设置后,重新启动Web服务器,警告将消失。