我已经创建了一个博客并设置了它,以便在每个博客文章中显示该博文的发布日期,我总是使用stroftime()并获取记录来自存储帖子的MySQL数据库的日期。stroftime代码不会在新的web服务器上显示日期
这一直工作,但我刚刚换了新的虚拟主机,当我尝试使用原来的代码:
<?php $date = strtotime($post['post_date']);
echo date('F jS, Y', $date); ?>
我得到一个错误,指出:
Warning: 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.
我米只是不明白他们希望我用date_default_timezone_set()替换。