I have a recurring appointment that I created in C# with Exchange Web Services EWS 2.0 that connects to Office 365 Exchange. The appointment displays correctly in my Outlook agenda for the summer time. But after october 26 (winter time) the appointment shifted with one hour (earlier).
Apparently this has something to do with daylight saving time, but I cannot figure out how this works. I would say that the time set in the appointment and set in UTC should be automatically converted by Outlook to display it in my correct Timezone (UTC+1 Amsterdam) and DST. But it fails on DST.
As you can see in the co The relevant part of the code I use to create an appointment:
Create the service:
ExchangeService _Service = new ExchangeService ExchangeVersion.Exchange2013_SP1,TimeZoneInfo.Utc);
Set the Timezone:
appointment.StartTimeZone = TimeZoneInfo.Utc;
appointment.EndTimeZone = TimeZoneInfo.Utc;
But still the appointment is shifted when daylight saving changes.
How can I create a recurring appointment with EWS that displays correctly in Outlook throughout the year?
EDIT: Solved it thanks to venkat-ayyadevara-msft and pjneary.
Actual the time-difference between West Europe and UTC is in summertime 2 hours, and in winter time only one hour. Therefore if you set your appointment in UTC, the starttime in UTC is always the same. But since W. Europe is 2 hours appart in summer and only hour in winter, the appointment shifts in time for W. Europe TZ for one hour.
Solution: determine in which TZ the start time must be fixed, and set that timezone to your appointment. If the time retrieve from your service or database is not in that timezone, you need to convert it to the timezone of the appointment.