正在加载……
php5时差问题
| |
Posted in LAMP on February 22, 2008 / 引用(0)
php5时差问题
<?php echo date("Y-m-d H:i:s");?>时间相差八小时
为什么呢?PHP5系列版本新增了时区设置,默认为格林威治时间,与中国所在的东8区正好相差8个小时
查找date.timezone有这么一行
;date.timezone =
将;去掉,改成
date.timezone = PRC
其中PRC:People's Republic of China 中华人民共和国
This entry comes from 本站原创 and has been read for 238 times.It is tagged with , , , .
发表评论

昵称

网址

电邮

OpenID登入 高级选项 表情