سؤال

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.

هل كانت مفيدة؟

المحلول

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;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top