Skip to content

Commit

Permalink
Fix getting a calendar event list with Exchange 14.2.247.0
Browse files Browse the repository at this point in the history
The SOAP query was returing the following error:

    The request failed schema validation: The 'EndDate' attribute is
    invalid - The value '2014-10-28' is invalid according to its
    datatype 'http://www.w3.org/2001/XMLSchema:dateTime' - The string
    '2014-10-28' is not a valid XsdDateTime value.

The fix is simply to use the DATETIME format instead of the DATE format,
as advised in the MSDN page of the CalendarView element.

http://msdn.microsoft.com/en-us/library/office/aa564515%28v=exchg.140%29.aspx
  • Loading branch information
nud committed Oct 27, 2014
1 parent a2eb2cc commit 21d2098
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyexchange/exchange2010/soap_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ def get_item(exchange_id, format=u"Default"):
return root

def get_calendar_items(format=u"Default", start=None, end=None, max_entries=999999):
start = start.strftime(EXCHANGE_DATE_FORMAT)
end = end.strftime(EXCHANGE_DATE_FORMAT)
start = start.strftime(EXCHANGE_DATETIME_FORMAT)
end = end.strftime(EXCHANGE_DATETIME_FORMAT)

root = M.FindItem(
{u'Traversal': u'Shallow'},
Expand Down

0 comments on commit 21d2098

Please sign in to comment.