Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to us
来源:互联网 发布:2017淘宝新手卖什么好 编辑:程序博客网 时间:2024/05/02 04:50
在用date()的时候出现了错误
Warning: date(): 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. inG:\CILearning\www\phpstudy.php on line 11
原因是php所取的时间和当地时间有出入,所以导致错误的出现
解决办法:
在页头使用date_default_timezone_set()设置我的默认时区为北京时间,即
<?php
date_default_timezone_set("PRC");
?>就可以了。
0 0
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to us
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use
- php时间出现Warning: date(): It is not safe to rely on the system's timezone settings. You are *required*
- PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* t
- 安装错误:Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the da
- It is not safe to rely on the system's timezone settings. You are *required*
- PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required*
- Warning: date() [function.date]: It is not safe to rely on the system's timezone settings.
- "PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You
- 解决php It is not safe to rely on the system's timezone settings. You are *required* to use the date.
- 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
- 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
- 【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.
- Android开发中无处不在的设计模式——原型模式
- iOS重绘机制drawRect 附:画图画线等code
- java后台压缩图片
- 在一个字符串中找到第一个只出现一次的字符。如输入abaccdeff,则输出b
- hibernate学习笔记
- Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to us
- map的详细用法
- Ehcache 整合Spring 使用页面、对象缓存
- 快速搭建SpringMVC+Mybatis+Freemarker .【ubuntu14.04】01
- android 中UID与PID的作用与区别
- java国际化中文编码转化
- 【新技能get】让App像Web一样发布新版本
- 使用aapt查看apk包名和启动的activity
- MYSQL创建用户Unknown column 'plugin' in 'mysql.user'的解决