PHP调整时区为日期 [英] PHP adjust time zone for date
本文介绍了PHP调整时区为日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
快速问题,
我的网站上的以下输出是-1小时,我只是想要一个快速的修复来相应地进行调整,但我不确定的正确语法...
The following output on my website is -1 hr, and I just wanted a quick fix to adjust it accordingly, but I'm not sure of the correct syntax...
<?=date('D, jS F @ g:ia', strtotime($row->datetime))?>
任何建议?
推荐答案
使用 date_default_timezone_set
的功能,将您的时区设置为服务器的时区。
Use the date_default_timezone_set
function of PHP to set the your timezone as default it is taking the timezone of server.
这里是时区列表。
这篇关于PHP调整时区为日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文