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":
"@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",
"iCalUId": "040000008200E00074C5B7101A82E008000000007388698AC5F5D901000000000000000010000000EA9F3D917031284AB6EEF7558F33CC4C",
"reminderMinutesBeforeStart": 15,
"isReminderOn":
"hasAttachments":
"subject": "Wasif Samad",
"bodyPreview": "Unit#: 35\r\n\r\nLead Details\r\n\r\nEmail: wasifsamad97@gmail.com\r\n\r\nView Tenant Notification Logs",
"importance": "normal",
"sensitivity": "normal",
"isAllDay":
"isCancelled":
"isOrganizer":
"responseRequested":
"seriesMasterId":
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.office365.com/owa/?itemid=AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0%2BHAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgAeCBwAAAA%3D%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl":
"isOnlineMeeting":
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals":
"occurrenceId":
"isDraft":
"hideAttendees":
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n</head>\r\n<body>\r\n<span>Unit#: 35</span><br>\r\n<br>\r\n<span><a href=\"https://stageapp.lethub.co/#/leads/52146\">Lead Details</a><span><br>\r\n<br>\r\n<span>Email: <a href=\"mailto:wasifsamad97@gmail.com\">wasifsamad97@gmail.com</a></span><br>\r\n<br>\r\n<span><a href=\"https://stageapp.lethub.co/#/tenantNotificationLog?showingId=214475\">View Tenant Notification Logs</a></span><br>\r\n<br>\r\n</span></span>\r\n</body>\r\n</html>\r\n"
},
"start": {
"dateTime": "2023-10-06T09:00:00.0000000",
"timeZone": "America/Los_Angeles"
},
"end": {
"dateTime": "2023-10-06T09:30:00.0000000",
"timeZone": "America/Los_Angeles"
},
"location": {
"displayName": "615 S Glendale Ave - 35 Glendale CA 91205",
"locationType": "default",
"uniqueId": "615 S Glendale Ave - 35 Glendale CA 91205",
"uniqueIdType": "private"
},
"locations": [
{
"displayName": "615 S Glendale Ave - 35 Glendale CA 91205",
"locationType": "default",
"uniqueId": "615 S Glendale Ave - 35 Glendale CA 91205",
"uniqueIdType": "private"
}
],
"recurrence":
"attendees": [],
"organizer": {
"emailAddress": {
"name": "Wasif Samad",
"address": "wasif.samad@lethub.co"
}
},
"onlineMeeting":
},
{
"@odata.etag": "W/\"IloTFbAhCkiHTVTwnI2TXQABf93HDQ==\"",
"id": "AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0_HAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgJ8E2gAAAA==",
"createdDateTime": "2023-10-05T13:56:33.1916212Z",
"lastModifiedDateTime": "2023-10-05T13:56:34.1370576Z",
"changeKey": "IloTFbAhCkiHTVTwnI2TXQABf93HDQ==",
"categories": [],
"transactionId": "95192cba-f3b3-0cc2-24bd-cb109fb38362",
"originalStartTimeZone": "America/Los_Angeles",
"originalEndTimeZone": "America/Los_Angeles",
"iCalUId": "040000008200E00074C5B7101A82E00800000000DB19A7BF93F7D901000000000000000010000000A4673223D8F83846B91515F96F2A048E",
"reminderMinutesBeforeStart": 420,
"isReminderOn":
"hasAttachments":
"subject": "all day event",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay":
"isCancelled":
"isOrganizer":
"responseRequested":
"seriesMasterId":
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.office365.com/owa/?itemid=AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0%2BHAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgJ8E2gAAAA%3D%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl":
"isOnlineMeeting":
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals":
"occurrenceId":
"isDraft":
"hideAttendees":
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"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"
},
"location": {
"displayName": "",
"locationType": "default",
"uniqueIdType": "unknown",
"address": {},
"coordinates": {}
},
"locations": [],
"recurrence":
"attendees": [],
"organizer": {
"emailAddress": {
"name": "Wasif Samad",
"address": "wasif.samad@lethub.co"
}
},
"onlineMeeting":
},
]
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",
"iCalUId": "040000008200E00074C5B7101A82E008000000007388698AC5F5D901000000000000000010000000EA9F3D917031284AB6EEF7558F33CC4C",
"reminderMinutesBeforeStart": 15,
"isReminderOn":
"hasAttachments":
"subject": "Wasif Samad",
"bodyPreview": "Unit#: 35\r\n\r\nLead Details\r\n\r\nEmail: wasifsamad97@gmail.com\r\n\r\nView Tenant Notification Logs",
"importance": "normal",
"sensitivity": "normal",
"isAllDay":
"isCancelled":
"isOrganizer":
"responseRequested":
"seriesMasterId":
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.office365.com/owa/?itemid=AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0%2BHAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgAeCBwAAAA%3D%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl":
"isOnlineMeeting":
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals":
"occurrenceId":
"isDraft":
"hideAttendees":
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n</head>\r\n<body>\r\n<span>Unit#: 35</span><br>\r\n<br>\r\n<span><a href=\"https://stageapp.lethub.co/#/leads/52146\">Lead Details</a><span><br>\r\n<br>\r\n<span>Email: <a href=\"mailto:wasifsamad97@gmail.com\">wasifsamad97@gmail.com</a></span><br>\r\n<br>\r\n<span><a href=\"https://stageapp.lethub.co/#/tenantNotificationLog?showingId=214475\">View Tenant Notification Logs</a></span><br>\r\n<br>\r\n</span></span>\r\n</body>\r\n</html>\r\n"
},
"start": {
"dateTime": "2023-10-06T16:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2023-10-06T16:30:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "615 S Glendale Ave - 35 Glendale CA 91205",
"locationType": "default",
"uniqueId": "615 S Glendale Ave - 35 Glendale CA 91205",
"uniqueIdType": "private"
},
"locations": [
{
"displayName": "615 S Glendale Ave - 35 Glendale CA 91205",
"locationType": "default",
"uniqueId": "615 S Glendale Ave - 35 Glendale CA 91205",
"uniqueIdType": "private"
}
],
"recurrence":
"attendees": [],
"organizer": {
"emailAddress": {
"name": "Wasif Samad",
"address": "wasif.samad@lethub.co"
}
},
"onlineMeeting":
},
{
"@odata.etag": "W/\"IloTFbAhCkiHTVTwnI2TXQABf93HDQ==\"",
"id": "AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0_HAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgJ8E2gAAAA==",
"createdDateTime": "2023-10-05T13:56:33.1916212Z",
"lastModifiedDateTime": "2023-10-05T13:56:34.1370576Z",
"changeKey": "IloTFbAhCkiHTVTwnI2TXQABf93HDQ==",
"categories": [],
"transactionId": "95192cba-f3b3-0cc2-24bd-cb109fb38362",
"originalStartTimeZone": "UTC",
"originalEndTimeZone": "UTC",
"iCalUId": "040000008200E00074C5B7101A82E00800000000DB19A7BF93F7D901000000000000000010000000A4673223D8F83846B91515F96F2A048E",
"reminderMinutesBeforeStart": 420,
"isReminderOn":
"hasAttachments":
"subject": "all day event",
"bodyPreview": "",
"importance": "normal",
"sensitivity": "normal",
"isAllDay":
"isCancelled":
"isOrganizer":
"responseRequested":
"seriesMasterId":
"showAs": "busy",
"type": "singleInstance",
"webLink": "https://outlook.office365.com/owa/?itemid=AQMkADI2ZDFmNDY4LTJlOWItNGVhOS1iM2E1LWZhMzg5ZDQ1MGUwNgBGAAADhQrIuhuED0%2BHAi76F3pFqAcAIloTFbAhCkiHTVTwnI2TXQAAAgENAAAAIloTFbAhCkiHTVTwnI2TXQABgJ8E2gAAAA%3D%3D&exvsurl=1&path=/calendar/item",
"onlineMeetingUrl":
"isOnlineMeeting":
"onlineMeetingProvider": "unknown",
"allowNewTimeProposals":
"occurrenceId":
"isDraft":
"hideAttendees":
"responseStatus": {
"response": "organizer",
"time": "0001-01-01T00:00:00Z"
},
"body": {
"contentType": "html",
"content": ""
},
"start": {
"dateTime": "2023-10-07T00:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2023-10-08T00:00:00.0000000",
"timeZone": "UTC"
},
"location": {
"displayName": "",
"locationType": "default",
"uniqueIdType": "unknown",
"address": {},
"coordinates": {}
},
"locations": [],
"recurrence":
"attendees": [],
"organizer": {
"emailAddress": {
"name": "Wasif Samad",
"address": "wasif.samad@lethub.co"
}
},
"onlineMeeting":
},
]
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.