Unable to get the start and end times for all day events in the preferer outlook.timezone.
I created an all day event for 7th October in GMT+5 time zone. The list and get methods of outlook calendar while using Prefer outlook.timezone is always returning the start and end times in GMT+5.
For example, this is the list method with Prefer = outlook.timezone="America/Los_Angeles":
"value": [
{
"@odata.etag": "W/\"IloTFbAhCkiHTVTwnI2TXQABf0dkGw==\"",
"id": "AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0_HAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgAeCBwAAAA==",
"createdDateTime": "2023-10-03T06:47:56.3712403Z",
"lastModifiedDateTime": "2023-10-03T06:47:57.2702329Z",
"changeKey": "IloTFbAhCkiHTVTwnI2TXQABf0dkGw==",
"categories": [],
"transactionId":
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"start": {
"dateTime": "2023-10-06T09:00:00.0000000",
"timeZone": "America/Los_Angeles"
},
"end": {
"dateTime": "2023-10-06T09:30:00.0000000",
"timeZone": "America/Los_Angeles"
},
},
{
"@odata.etag": "W/\"IloTFbAhCkiHTVTwnI2TXQABf93HDQ==\"",
"id": "AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0_HAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgJ8E2gAAAA==",
"createdDateTime": "2023-10-05T13:56:33.1916212Z",
"lastModifiedDateTime": "2023-10-05T13:56:34.1370576Z",
"reminderMinutesBeforeStart": 420,
"isReminderOn":
"hasAttachments":
"subject": "all day event",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay":
"isCancelled":
"isOrganizer":
"responseRequested":
"seriesMasterId":
"showAs": "busy",
"type": "singleInstance",
"body": {
"contentType": "html",
"content": ""
},
"start": {
"dateTime": "2023-10-07T00:00:00.0000000",
"timeZone": "America/Los_Angeles"
},
"end": {
"dateTime": "2023-10-08T00:00:00.0000000",
"timeZone": "America/Los_Angeles"
},
},
]
This is the same request using Prefer = outlook.timezone="UTC"
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('36e3c7fc-1c36-41a0-9545-fe8480386523')/calendar/calendarView",
"value": [
{
"@odata.etag": "W/\"IloTFbAhCkiHTVTwnI2TXQABf0dkGw==\"",
"id": "AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0_HAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgAeCBwAAAA==",
"createdDateTime": "2023-10-03T06:47:56.3712403Z",
"lastModifiedDateTime": "2023-10-03T06:47:57.2702329Z",
"changeKey": "IloTFbAhCkiHTVTwnI2TXQABf0dkGw==",
"categories": [],
"transactionId":
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"start": {
"dateTime": "2023-10-06T16:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2023-10-06T16:30:00.0000000",
"timeZone": "UTC"
},
},
{
"@odata.etag": "W/\"IloTFbAhCkiHTVTwnI2TXQABf93HDQ==\"",
"id": "AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0_HAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgJ8E2gAAAA==",
"createdDateTime": "2023-10-05T13:56:33.1916212Z",
"lastModifiedDateTime": "2023-10-05T13:56:34.1370576Z",
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"reminderMinutesBeforeStart": 420,
"isReminderOn":
"hasAttachments":
"subject": "all day event",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay":
"isCancelled":
"isOrganizer":
"responseRequested":
"seriesMasterId":
"showAs": "busy",
"type": "singleInstance",
"start": {
"dateTime": "2023-10-07T00:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2023-10-08T00:00:00.0000000",
"timeZone": "UTC"
},
},
In each of the requests, the first event is a normal event. It obeys the Prefer outlook.timezone, but the second event which is an all-day event does not obey the preferred time zone. This is an important bug as I save the event and I don't know in which time zone I am receiving the events. I need to show these events to the users of my application in their time zone.
I tried using different timezones in the prefer header. The normal events timezone was changed but the all day events start and end times did not change