Quantcast
Channel: 《php时区设定,确保date()返回正确的本地时间》的评论
Viewing all articles
Browse latest Browse all 5

作者:maniacXP

$
0
0

可以用 gmdate(‘o-m-j H:i’); 返回格林威治时间.
然后加上你需要时区与GMT时间相差的秒数就可以了, 不用改ini文件.
gmdate(‘Y-m-d H:i:s’, time()+8*60*60); 返回+8时区时间.


Viewing all articles
Browse latest Browse all 5

Latest Images