php错误_date(): It is not safe to rely on the system's timezon
当php遇到这种错误,请更改php.ini文件
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.
根据提示,是php.ini中关于时区的设置问题。
查找一下:date.timezone = ?
如果是 ;date.timezone = ?
去掉前面的;号。=号后面的值可以设置为:PRC、Asia/Chongqing、Asia/Shanghai或Asia/Urumqi等试试。
如果是港台地区可以设置为:Asia/Macao 、Asia/Hong_Kong 或Asia/Taipei 等试试。
格式如:
date.timezone搜索 = PRC
热文精选
更多资讯推荐
更多- Stable Diffusion 2.0 发布,加强成人内容过滤
- .NET 7 正式发布
- A3Mall 开源商城系统 v2.1 发布
- FydeOS v14 版本更新:优化输入法体验+重构安卓子系统+全新应用启动器
- ThinkPHP V6.0.8版本发布——多环境变量配置支持
- 毕昇 JDK 8u292、11.0.11 发布!
- KubeVela 1.0:开启可编程式应用平台的未来
- Eclipse 4.19 稳定版发布
- 阿里巴巴 Arthas 3.5.0 版本发布,支持反编译打印行号和统一鉴权
- Debian 11 Bullseye 即将进入冻结,Debian 13 代号 Trixie
- Rancher 2.5 发布,新增支持边缘集群的 GitOps
- FlashDB IoT 超轻量级嵌入式数据库