error in showing outlook appointment time using php

萝らか妹 提交于 2019-12-25 05:01:35

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!