From a8ea115a448d1607768b7775ae4deadfdcd02801 Mon Sep 17 00:00:00 2001 From: Alex van Andel Date: Thu, 22 Apr 2021 13:58:48 +0000 Subject: [PATCH] Even though Office 365 is set to UTC, it does not respond with Z in the API response indicating UTC, this fixes that by adding the Z --- lib/calendarClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/calendarClient.ts b/lib/calendarClient.ts index f224383b..dae3ccb0 100644 --- a/lib/calendarClient.ts +++ b/lib/calendarClient.ts @@ -106,7 +106,7 @@ const MicrosoftOffice365Calendar = (credential) => { }) .then(handleErrors) .then( responseBody => { - return responseBody.value[0].scheduleItems.map( (evt) => ({ start: evt.start.dateTime, end: evt.end.dateTime })) + return responseBody.value[0].scheduleItems.map( (evt) => ({ start: evt.start.dateTime + 'Z', end: evt.end.dateTime + 'Z' })) }) ).catch( (err) => { console.log(err);