XAMPP PHP日期函数时间与本地机器时间不同 [英] XAMPP PHP date function time is different from local machine time

查看:11
本文介绍了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日期函数时间与本地机器时间不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆