Question

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

Was it helpful?

Solution

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 :

J-xchange

For my specific question, it looks like setStartTimeZone function expect a C# object, which it's not possible to get.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top