问题
I am pulling the appointments of user from outlook web access. Problem is Tuesday, October 08, 2013 2:30 PM-4:30 PM time is changed into 2013-10-08T08:45:00.000Z and 2013-10-08T10:45:00.000Z. What is the problem here? I want to show 2:30 PM. For the purpose I am using 8068-PHP-Access-Microsoft-Exchange-Web-services-via-OWA-API
Any help/suggesstions are welcome.
回答1:
It seems even though the time setting is correct when we pull the data the time setting is changed to GMT. So for the purpose I added the following code:
date_default_timezone_set("GMT");
$timestamp = strtotime("2013-10-08 08:45:00");
date_default_timezone_set("Asia/Kathmandu");
$utc_datetime = date("Y-m-d H:i:s", $timestamp);
echo $utc_datetime;
来源:https://stackoverflow.com/questions/19245556/error-in-showing-outlook-appointment-time-using-php