Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeZone sets to UTC on all_day_events #6

Open
dboze opened this issue Oct 9, 2012 · 4 comments
Open

TimeZone sets to UTC on all_day_events #6

dboze opened this issue Oct 9, 2012 · 4 comments

Comments

@dboze
Copy link

dboze commented Oct 9, 2012

I am seeing this behavior when creating all_day_events as described here:

http://stackoverflow.com/questions/7828823/exchange-2010-web-services-creation-of-an-all-day-event-appointment

I am guessing this is because the Exchange server I am using is on Office365 (hosted Exchange) and therefore has a default server time of UTC.

Would adding StartTimeZone and EndTimeZone to CalendarItem as well as creating an Entry of TimeZone with and :id and :name (as described here http://msdn.microsoft.com/en-us/library/exchange/ff406132(v=exchg.140).aspx) be the best way to go?

Thanks!

@ebeigarts
Copy link
Owner

This feature is not implemented in exchanger, but looks like StartTimeZone and EndTimeZone is the way to go.

Maybe exchanger could in future set this automatically using tzinfo gem.

@dboze
Copy link
Author

dboze commented Oct 11, 2012

Thanks for pointing me in the right direction! So I got exchanger to send the request I wanted and received

The request is valid but does not specify the correct server version in the RequestServerVersion SOAP header. Ensure that the RequestServerVersion SOAP header is set with the correct RequestServerVersionValue.

So I added to CreateItem

xml.send("soap:Header") do
  xml.send("t:RequestServerVersion", "Version" => "Exchange2010")
end

(Naturally, I will clean it up so the Version can be specified in the config YAML) In turn, I was given:

The EWS Id is in EwsLegacyId format which is not supported by the Exchange version specified by your request. Please use the ConvertId method to convert from EwsLegacyId to EwsId format.

So I've attempted to add to the body of the request

xml.send("ConvertId", "xmlns" => NS["m"], "xmlns:t" => NS["t"], "DestinationFormat" => "OwaId") do
  xml.send("SourceIds") do
    xml.send("t:AlternateId", "Format" => "EwsLegacyId", "Id" => "", "Mailbox" => "[email protected]")
  end
end

But I am at a loss as to how to ascertain the Id for a given mailbox. Any thoughts?

Thanks again for the help!

Edit: Oh, I see! I can get the Id from the find response, duh! I'm not quite sure how to clean all of this up, but I'll make an attempt and send it your way. Will this functionality need to be added to all of the operations? I don't need them all myself, but I want to give a little back to this great gem.

@ebeigarts
Copy link
Owner

I just updated specs and run them against Office 365 and all the existing specs are running fine there.

It would be great to have RequestServerVersion configurable and support for meetings :)

@kevinjbayer
Copy link

Was this ever implemented? I'm having issues where the calendar items are showing the correct time on the calendar, but when you edit, it's showing in UTC like "(UTC+00:00) Monrovia, Reykjavik". Anything I send on the CalendarItem itself doesn't seem to affect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants