ews-java-api icon indicating copy to clipboard operation
ews-java-api copied to clipboard

Failure to parse EndDateRecurrence

Open jimdunkerton opened this issue 12 years ago • 2 comments

If you look at the XML response to a request for calendar items, where there is at least one item with a recurring rule, you may see a date like the following:

2014-07-07+01:00

which I have seen given as the value for the StartDate element of an EndDateRecurrence element. An exception is thrown when trying to parse this date.

I believe it's down to the fact that the basic java.util.Date API doesn't deal well with offsets specified in this way. Joda-Time may be a good way to go.

jimdunkerton avatar Sep 04 '14 09:09 jimdunkerton

I was able to fix this in ExchangeServiceBase.convertStartDateToUnspecifiedDateTime(), using Joda-Tme. This method appears to be called only called when trying to read a start date for a recurrence range.

It will also handle cases where the offset is 'Z', indicating UTC, as well as an offset such as +01:00.

jimdunkerton avatar Sep 04 '14 12:09 jimdunkerton

close this issue?

ahaarrestad avatar Feb 03 '15 08:02 ahaarrestad