php日期/时间输出与我系统上显示的不匹配
I changed the timezone setting on my php.ini (xampp server) to date.timezone=Asia/Kolkata
.
On my index.php I have this
date_default_timezone_set("Asia/Kolkata");
echo date('d-m-Y H:i:sa');
Result, I get is, 12-08-2015 11:42:49am, where as the actual date time at the time of running this script is 11-08-2015 11:12pm.
The date and time is like 12 hours apart from what actually it is.
Can you help.
我将php.ini(xampp服务器)上的时区设置更改为 在我的index.php上我有这个 p>
结果 strong>,我知道的是,12-08-2015 11:42:49 am,其中 运行此脚本时的实际日期时间是11-08-2015 11:12 pm。 p>
日期和时间与实际情况相差12小时。 p>
你能帮忙。 p>
div> date.timezone = Asia / 加尔各答代码>。 p>
date_default_timezone_set(“Asia / Kolkata”);
echo date('dmY H: 我:sa');
code> pre>
Check your system time, date and timezone in the windows control panel. Make sure it is accurate.