|
@@ -12,6 +12,8 @@ import { getShareInfoText } from '../../invite';
|
12
|
12
|
|
13
|
13
|
import { setCalendarAPIAuthState } from '../actions';
|
14
|
14
|
|
|
15
|
+import { findWindows } from 'windows-iana';
|
|
16
|
+
|
15
|
17
|
/**
|
16
|
18
|
* Constants used for interacting with the Microsoft API.
|
17
|
19
|
*
|
|
@@ -560,9 +562,13 @@ function requestCalendarEvents( // eslint-disable-line max-params
|
560
|
562
|
startDate.toISOString()}' and End/DateTime lt '${
|
561
|
563
|
endDate.toISOString()}'`;
|
562
|
564
|
|
|
565
|
+ const ianaTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
566
|
+ const windowsTimeZone = findWindows(ianaTimeZone);
|
|
567
|
+
|
563
|
568
|
return client
|
564
|
569
|
.api(`/me/calendars/${calendarId}/events`)
|
565
|
570
|
.filter(filter)
|
|
571
|
+ .header('Prefer', `outlook.timezone="${windowsTimeZone}"`)
|
566
|
572
|
.select('id,subject,start,end,location,body')
|
567
|
573
|
.orderby('createdDateTime DESC')
|
568
|
574
|
.get()
|