warning: strtotime(): It is not safe to rely on the system's timezone settings
来源:互联网 发布:linux设置ip地址命令 编辑:程序博客网 时间:2024/05/01 05:40
调试PHP程序时,遇到的问题反馈代码:
PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
解决方法:
方法1:
(最好的方法)在php.ini里加上找到date.timezone项,设置date.timezone = "Asia/Shanghai",重启环境就ok了。
方法2:
在需要用到这些时间函数的时候,在页面添加date_default_timezone_set("PRC");
方法3:
在页头加上设置时区ini_set('date.timezone','Asia/Shanghai');
0 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.
- 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. 解决方法:
- Cacti编译安装错误: Warning: strtotime(): 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】PHP Warning: date(): It is not safe to rely on the system's timezone settings.
- Warning: date(): It is not safe to rely on the system's timezone settings
- Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.
- yii产生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
- Warning: phpinfo() [function.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】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.
- Warning: strftime() [function.strftime]: It is not safe to rely on the system's timezone settings.
- Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings.
- poj 3009 Curling2.0 回溯搜索
- 你了解实时计算吗?
- pipelined function
- [Leetcode 10, Hard] Regular Expression Matching
- Codeforces Gym 2015 ACM Arabella Collegiate Programming Contest
- warning: strtotime(): It is not safe to rely on the system's timezone settings
- 将Latex tex文档转换成 word文档(下)
- 1212
- Model ensembling
- Java学习笔记-------数据库疑问
- item-based algorithm
- Android NDK 实践(用C编写Android程序)
- 乐观的程序员
- HTML5基础21----简单Web留言本(功能未实现)