I’m working on an add-in for Microsoft Outlook which can help a user schedule meetings when they click on a detected date in an email. When the date is clicked on and our add-in’s web view loads, we use the command Office.context.mailbox.item.getSelectedEntities() or getEntities() to grab the meeting suggestions that Office.js has generated from the email’s body text.
This had been working for a while, but now we’re noticing that the times of the meeting suggestions we are getting from Office.js are several hours off if our add-in is running in the Outlook Web App. We think that Office.js is interpreting all times written in the email to be in UTC instead of in the user’s default timezone like the documentation says here: https://learn.microsoft.com/en-us/javascript/api/outlook/office.meetingsuggestion?view=outlook-js-preview#remarks. Then the times are being converted from UTC to the user’s timezone.
The issue seems to be specific to the Outlook Web App - we’ve not been seeing the issue in Outlook 2016 for Windows and Outlook for Mac.
If you try running the sample code in that documentation page from within an add-in running in the Outlook Web App, you should see that the start and end times are incorrect. Here is a screenshot of the results (the code on the left was run in Outlook Web App and the code on the right was run in Outlook 2016 for Windows:
Was there a recent change to Office.js that resulted in incorrect handling of timezones for meeting suggestions?
Thank you.