PHP 时间错误

WBOY
Release: 2016-06-23 14:32:39
Original
892 people have browsed it

1. PHP记录LOG的时间和系统时间不一致,在php.ini中设置timezone无用,php文件中添加 “date_default_timezone_set ('Asia/Shanghai');”无用。

2. 尝试修改系统(solaris 10)时区及时间,时区设置为“PRC”,再设置时间,reboot,编译php文件,LOG记录时间OK。

3. 设置系统时区:修改/etc/default/init,设置TZ=PRC,TZ的值应该对就/usr/share/lib/zoneinfo中的某一个文件;

4. 设置系统时间:date 011018302012.05,对应的时间是2012-01-10 18:30:05。

5. 参考资料,solaris时区设置1,时区设置2,时间设置。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template