Calendar: Ensure TimeZone info in SOAP-header request
Hi,
Versions:
- 3.36.5-0ubuntu1
- evolution-ews 3.36.5-0ubuntu1.1 amd64
- EWS: "Exchange2010" or "Exchange2015"
- Exchange On-Premise Server 2019, latest CU
I guess the SOAP-Request to create a meeting on an Exchange On-Prem Server through EWS might be broken. I will describe our findings as good as possible. I cannot call certain code files/parts to have an issue. Sorry for that. No Dev.
The workflow to trigger the problem is: Create a meeting inside Evolution. Use a timezone different to UTC. In our case UTC+1/CET. Store the meeting inside Exchange using EWS.
If you look at the EWS-file structure/schema of the meeting inside the Exchange-DB with a EWS-debugging-tool you can see that the meeting is stored as UTC, instead of UTC+1 like the user/client wished.
The key “TimeZone” has the value “UTC” written to it.
I don’t know how evolution send its SOAP-Request to EWS, but if you send a meeting manually (without using Evolution) to EWS using this header …
<soap:Header>
<t:RequestServerVersion Version=“Exchange2010” />
<t:TimeZoneContext>
<t:TimeZoneDefinition Id=“W. Europe Standard Time” />
</t:TimeZoneContext>
</soap:Header>
(RequestServerVersion Version=“Exchange2010” is the version of EWS not the Exchange-Server. Changing it to the newest EWS-version (Exchange2015) doesn’t make a difference).
… this manual SOAP-Request leads to a (kind of) correct value for the key TimeZone"-> “(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague”. This fixes the issue. To be complet. Kind a correct because we should see "Berlin Time". I don't know if "Berlin" vs "Belgrade" may lead to problems when sommer/wintertime rolls in.
Using OWA (where you don’t have the possibility to change the timezone for a meeting as a user) to create a meeting leads to a different value for TimeZone, which also doesn’t lead to a problem. So OWA itself works. Using OWA we find the value “Customized Time Zone” inside the EWS-file.
We initially found the problem while we tested Microsoft Teams, which also uses EWS with a Exchange-Hybrid setup to store meeting in Exchange. The usage of the calendar in Teams also leads to the same broken meetings inside our On-Premise Exchange-DB. I described the problem here. Together with screenshot of the broken EWS-files: https://techcommunity.microsoft.com/t5/exchange/teams-uses-ews-api-wrong-which-leads-to-wrong-timezone-in/m-p/3643693
We talked to Microsoft-Support and they opened a issue in Teams aswell. So I guess they do the same "failure"
If you look at the tech documentation of Microsoft where they describe how a client has to talk over EWS you will find the SOAP-Request mentioned above. See: https://learn.microsoft.com/en-us/exchange/client-developer/exchange-web-services/how-to-create-appointments-in-a-specific-time-zone-by-using-ews-in-exchange
Thanks and keep the good work up!
Greets
Sebastian