PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings.
来源:互联网 发布:java框架怎么用 编辑:程序博客网 时间:2024/05/22 10:53
环境介绍:
CentOS 6.X
PHP 5.3.8
调试php时出现这个警告,其实这个警告信息就是PHP的时区设置不对;
解决办法:
1.检查系统的时区设置
#cat /etc/sysconfig/clock
ZONE="Asia/Shanghai"
2.设置php.ini的时区为系统时区即可
修改php修改php.ini加入如下设置
date.timezone = "Asia/Shanghai"
再次调试问题解决
备注:php5.6.1版本除了加入这个参数,还要重启PHP服务才能生效;
CentOS 6.X
PHP 5.3.8
调试php时出现这个警告,其实这个警告信息就是PHP的时区设置不对;
解决办法:
1.检查系统的时区设置
#cat /etc/sysconfig/clock
ZONE="Asia/Shanghai"
2.设置php.ini的时区为系统时区即可
修改php修改php.ini加入如下设置
date.timezone = "Asia/Shanghai"
再次调试问题解决
备注:php5.6.1版本除了加入这个参数,还要重启PHP服务才能生效;
1 0
- PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings
- PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings.
- PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings.
- PHP Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. 解决方法:
- warning: strtotime(): It is not safe to rely on the system's timezone settings
- 【php】PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- 【php】PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- PHP Warning: date(): It is not safe to rely on the system’s timezone settings
- PHP Warning: date(): It is not safe to rely on the system's timezone settings
- PHP Warning: phpinfo(): It is not safe to rely on the system\'s timezone settings
- PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings
- php Warning:date(): It is not safe to rely on the system's timezone settings
- php Warning: phpinfo(): It is not safe to rely on the system's timezone settings.解决方法
- PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings
- php Warning: date(): It is not safe to rely on the system's timezone settings.
- PHP Warning: date(): It is not safe to rely on the system’s timezone settings
- Cacti编译安装错误: Warning: strtotime(): It is not safe to rely on the system's timezone settings.
- HDU 1016 Prime Ring Problem(深搜)
- Python学习十三:map/reduce
- 第一个JSP程序(JSP入门)
- jquery的animate函数详解
- Linux下常用命令
- PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings.
- LeetCode Subsets
- 采药 (背包)
- poj 3307 Smart Sister 打表解因子生成数问题
- Quick Reference:php5 Phar文件生成
- Java GC
- 标准C++中的string类的用法总结
- Linux下Rsync+Inotify-tools实现数据实时同步
- string类