XAMPP PHP date function time is different from local machine time(XAMPP PHP日期函数时间与本地机器时间不同)
问题描述
我的电脑当地时间是12-03-2013 4:30pm
.
我的 XAMPP 日期函数将时间打印为 12-03-2013 10:49:56
.
My XAMPP date function prints the time as 12-03-2013 10:49:56
.
如何设置XAMPP服务器时间以显示系统时间?
How can I set the XAMPP server time to display the system time?
推荐答案
转到 C:xamppphpphp.ini
,或者你的自定义路径 php.ini
是,打开它.
Go to C:xamppphpphp.ini
, or your custom path where php.ini
is, open it.
查找以下内容:date.timezone = "Europe/Warsaw"
.可能你的价值与我的 Europe/Warsaw
不同.所以只搜索字符串:date.timezone
.
Look for the following: date.timezone = "Europe/Warsaw"
. Probably You have different value than my Europe/Warsaw
. So search just string: date.timezone
.
将值 Europe/Warsaw
更改为适当的值,例如 date.timezone = "Asia/Kolkata"
Change value Europe/Warsaw
to the proper value, for example date.timezone = "Asia/Kolkata"
如果有人在寻找他的位置,请检查有效值 http://php.net/manual/zh/timezones.php
If someone's looking for his location, check valid values http://php.net/manual/en/timezones.php
别忘了重启你的 XAMPP.
Don't forget to restart your XAMPP.
这篇关于XAMPP PHP日期函数时间与本地机器时间不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:XAMPP PHP日期函数时间与本地机器时间不同


- SoapClient 设置自定义 HTTP Header 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- Laravel 仓库 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01