Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm doing a DAV to EWS conversion myself. Something that might be of interest I ran across from <a href="http://msdn.microsoft.com/en-us/library/bb738399.aspx" rel="nofollow">Best Practices for Using Exchange Web Services for Calendaring Tasks</a> (Ex 2007, but I assume applies to Exchange 2010 and 2013)</p> <blockquote> <p>When Exchange Web Services receives a request to create a new CalendarItem for which the start and End properties are identified by non-UTC-offset strings, the server must convert the Start and End properties to Coordinated Universal Time (UTC) before the CalendarItem can be stored. The following are the rules for the conversion to UTC:</p> <p>If the request contains an explicit time zone definition via a <b>MeetingTimeZone</b> property, the server will apply the correct offset with regard to Standard and Daylight rules as defined by the time zone.</p> <blockquote> <p>If no explicit time zone is defined, the current time zone of the computer that is running Exchange 2007 (specifically, the Client Access server that is processing the request) will be used.</p> <p><b>Note:</b> In Exchange 2007 SP1, all unspecified time zones are set to UTC instead of the time zone of the Client Access server.</p> </blockquote> </blockquote> <p>Experimenting a little bit, I found that if you do not specify a timezone, EWS will indeed apply the time as UTC. If IsAllDayEvent is true start times and end are ignored besides their date component. So an all day event turns into 12:00am-12:00am UTC or 5:00pm-5:00pm on my calendar (I'm -7 UTC also). The Best Practices article recommends using the MeetingTimeZone element, but I received an error that it was depreciated, use StartTimeZone and EndTimeZone instead. Indeed adding &lt;StartTimeZone Id="Pacific Standard Time"&gt; seems to work.</p> <p>As far as your 3 day issue goes I was able to reproduce similar results. Here is what I <em>suspect</em> is happening. If you tell Exchange the start time is 7am and end time is 8am, and flag it all day, it will automatically set the start and end times to yyy-mm-ddT00:00:00 and yyy-mm-<b>dd+1</b>T00:00:00. So if I send an appointment for 2011-11-04T07:00:00 to 2011-11-05T07:00:00 w/o the timezone element, it thinks I'm trying to span two days. The start time 2011-11-04T07:00:00 becomes 2011-11-04T00:00:00 to 2011-11-05T00:00:00. The end time 2011-11-05T07:00:00 becomes becomes 2011-11-05T00:00:00 to 2011-11-06T00:00:00. This gets thrown on the calendar as UTC. When viewed it in Outlook or in webapp it displays it in PST as Nov 3rd 5pm - Nov 6th 5pm and looks like its spanning 3 days (but only actually only 48 hours).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload