1
votes

Okay, let's start from scratch on this subject. I'm using Coldfusion 9, Exchange 2013, and EWS API 2.0. I can connect and add a calendar event without time zone being specified. The user I'm adding the event for is on the east coast. I can tell from his record in a table where the values are 0=CST and 1=EST.

<cfobject type="Java" class="microsoft.exchange.webservices.data.TimeZoneDefinition" name="timezoneinfo">
<cfset timezoneinfo.init( service )>

appointment.StartTimeZone = timezoneinfo.FindSystemTimeZoneById("Eastern Standard Time");

The error is; java.lang.ClassNotFoundException: microsoft.exchange.webservices.data.TimeZoneDefinition

There is no clear cut definition on how to do what I need. If I leave out the time zone code, an appointment for 9:00 AM is added to the calendar for 5:00 AM.

1
Have you read these recently published articles about the EWS Managed APIs and timezones? Time zones and EWS in ExchangeMimi Gentz
I understand WHAT they are saying. I just don't know how to USE what they are saying. Completely off the point: Read the difference between EWS and EWS Managed API. And when they use the term "intuitive" my nose starts to bleed.user990016
Is it possible that I need to adjust the date/time to reflect UTC?user990016
You should not have to adjust times. The ExchangeService object has a time zone associated with it, you can set that via the constructor if you don't want to use the default from the client computer. You can also set the time zone via the StartTimeZone and EndTimeZone properties.Jason Johnston

1 Answers

2
votes

Ah I think I see the problem. TimeZoneDefinition is not a class in the Microsoft.Exchange.WebServices.Data namespace. The Appointment.StartTimeZone property is a System.TimeZoneInfo object.

I'm not familiar with ColdFusion, and I'm a novice with Java, but I'm guessing that the first line of your code above is the one causing the error.

Edit: As I re-read this, I think you're using the EWS Java API, not the EWS Managed API. In that case TimeZoneDefinition is a class in the library. I'm not familiar enough with the Java API to give you a sample of using it though. There is some information that seems relevant in this thread though. Hope that helps!