Reputation: 85
I am using the PHP EWS library from github (https://github.com/jamesiarmes/php-ews).
When retrieving a set of calendar item using CalendarView, the items are received with a time difference of 1 hour. The exchange server timezone is set to "(UTC) Dublin, Edinburgh, Lisbon, London" and daylight saving is turned on.
Going through the EWS 2010 documentation, there is no way of specifying what time zone my client APP is in using CalendarView.
I have changed the timezone of the server running my app and have tried many other things to try and get the appointment times between the exchange server and my app to no avail.
Can anyone advise how this can be overcome?
Many thanks,
Upvotes: 1
Views: 1057
Reputation: 22032
You need to specify the Timezone and DST transition in the SOAP header eg for the particular timezone you mentioned it would be
<soap:Header>
<t:RequestServerVersion Version="Exchange2013" />
<t:TimeZoneContext>
<t:TimeZoneDefinition Name="(UTC) Dublin, Edinburgh, Lisbon, London" Id="GMT Standard Time">
<t:Periods>
<t:Period Bias="P0DT0H0M0.0S" Name="Standard" Id="Std" />
<t:Period Bias="-P0DT1H0M0.0S" Name="Daylight" Id="Dlt/1" />
</t:Periods>
<t:TransitionsGroups>
<t:TransitionsGroup Id="0">
<t:RecurringDayTransition>
<t:To Kind="Period">Dlt/1</t:To>
<t:TimeOffset>P0DT1H0M0.0S</t:TimeOffset>
<t:Month>3</t:Month>
<t:DayOfWeek>Sunday</t:DayOfWeek>
<t:Occurrence>-1</t:Occurrence>
</t:RecurringDayTransition>
<t:RecurringDayTransition>
<t:To Kind="Period">Std</t:To>
<t:TimeOffset>P0DT2H0M0.0S</t:TimeOffset>
<t:Month>10</t:Month>
<t:DayOfWeek>Sunday</t:DayOfWeek>
<t:Occurrence>-1</t:Occurrence>
</t:RecurringDayTransition>
</t:TransitionsGroup>
</t:TransitionsGroups>
<t:Transitions>
<t:Transition>
<t:To Kind="Group">0</t:To>
</t:Transition>
</t:Transitions>
</t:TimeZoneDefinition>
</t:TimeZoneContext>
</soap:Header>
This is documented in http://msdn.microsoft.com/en-us/library/ee332363(v=exchg.140).aspx
Cheers Glen
Upvotes: 1