问题
I printed below code on my local server and on my hosting server but seems both displaying diff. time for UTC timezone. Please explain me.
echo print gmdate("Y-m-d\TH:i:s\Z");
//Output on LOCAL SERVER: 2014-09-12T08:02:49Z1UTC //It is the correct one
//Output on HOSTING SERVER: 2014-09-12T06:51:39Z1
回答1:
Finally, I got the solution. Actually my server time is not sync with world clock. I needed to install NTP (Network Time Protocol) service on my server. I have installed on CentOs using below link.
Check this out: http://www.cyberciti.biz/faq/howto-install-ntp-to-synchronize-server-clock/
来源:https://stackoverflow.com/questions/25803590/why-current-utc-time-on-my-local-server-and-utc-time-on-my-hosting-server-are-di