Reputation:
When trying to set the start time zone of an appointment (in ews java API 1.1.5) I get an error. I'm trying to set the time zone because an exception is raised when using appointment.setStart otherwise.
Appointment = new Appointment(service);
appointment.setStartTimeZone(new TimeZoneDefinition() {{setId("what should go hère")}});
appointment.setStart(startTime);....
Using exchange 2007
Upvotes: 2
Views: 1706
Reputation: 11
I was able to get around this by commenting out the validation code regarding StartTimeZone (lines 247-256 of Appointment.java) and recompiling the jar. If I pass in date/times based on UTC, the appointment gets created in the user's timezone.
Upvotes: 1
Reputation:
It finally appear that the JAVA EWS API is a bad (and full of bugs) port of the C# version. So the rule is simply to not use it.
There is some alternative out there :
For my specific question, it looks like setStartTimeZone function expect a C# object, which it's not possible to get.
Upvotes: 2