php - Linux CentOS 无法更改时区
问题描述
我已将加载的 PHP ini 文件中的时区设置更改为:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/Santiago"
我重新启动了 httpd 服务,然后加载了一个只有 phpinfo() 方法调用的 info.php 页面。令我惊讶的是,默认时区仍显示为 UTC。
除了加载的文件之外,我还更改了其他 php.ini 文件,但没有成功。
但是,如果我使用命令行 php,它会显示正确的时区。
有什么建议吗?
解决方案
推荐阅读
- php - 当我登录时,它会将我重定向到个人资料页面,而不是我想留在同一页面上。有什么解决办法吗?
- android - Flutter java.lang.IllegalArgumentException:服务未注册:com.google.android.gms.measurement.internal
- javascript - Gulp 不创建文件
- neo4j - 将 Reactome 数据库加载到 Neo4j 失败
- google-cloud-platform - 优化内存密集型数据流管道的 GCP 成本
- reactjs - 与 React 一起使用时未调用 requestAnimationFrame 回调
- file-upload - 成功上传后文件未发送 - Jmeter
- aws-lambda - AWS Cloudformation SAM 文件 - 如何拆分为许多较小的文件?
- datastax - cassandra 数据库 - 获取时间高于 Netflix Astyanax 驱动程序而不是 datastax 驱动程序
- python - 如何使用python while循环打印地址为伯明翰的所有名字?我不知道从哪里开始