Smarty小问题

liujingga33 2019-10-11 02:06:11
Warning: 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 'UTC' for '8.0/no DST' instead in D:\网站\PHP网站\Smarty\libs\sysplugins\smarty_internal_runtime_codeframe.php on line 48


警告:strftime():依赖系统的时区设置是不安全的。您需要*使用date.timezone设置或date_default_timezone_set()函数。如果您使用了这些方法,您仍然得到了这个警告,那么您最有可能拼写的是时区标识符。我们选择了“UTC”,用于“8.0 / no DST”而不是 D:\网站\PHP网站\Smarty\libs\sysplugins\smarty_internal_runtime_codeframe.php 在48行。


没写几行代码,怎么跟时区有干系了?date_default_timezone_set()参数怎么选?中国有几个时区,我在山东日照,选哪个?
...全文
65 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
liujingga33 2019-10-12
  • 打赏
  • 举报
回复
好像是 Asia/Shanghai
于小九 2019-10-11
  • 打赏
  • 举报
回复
尝试一下在该文件头部添加时区设置 <?php date_default_timezone_set("PRC"); 

4,251

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧