# 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 the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.
# solution
sudo vim /etc/php.ini
# date.timezone = Asia/Hong_Kong
sudo service httpd restart
本文介绍了一种常见的PHP strtotime()函数使用过程中遇到的时间设置警告问题及其解决方案。通过修改php.ini文件中的时区配置并重启HTTP服务,可以有效解决此问题。
175

被折叠的 条评论
为什么被折叠?



