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.
相关文章