欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

php日期问题

程序员文章站 2022-04-18 16:20:16
...
";

?>
出现这个是什么原因

php日期问题
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 F:appappserverAppServwwwdate1.php on line 7
浠婂ぉ鏄� 2016/11/08

回复内容:

";

?>
出现这个是什么原因

php日期问题
Strict Standards: date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 F:appappserverAppServwwwdate1.php on line 7
浠婂ぉ鏄� 2016/11/08

在使用之前设置时区。

应该是时区不对 设置下时区
传送 设置时区方法 http://www.jb51.net/article/3...
有用顶下 采纳 谢谢

时区没有设置,更改一下php.ini文件中的date.timezone = PRC ,进行如上的更改,然后重启一下服务器

date_default_timezone_set('PRC');

修改php.ini的配置项data.timezone = "Asia/Shanghai"。或者如下

";
相关标签: php