Microsoft graph api 使用microsoft graph计划会议时的时区问题

Microsoft graph api 使用microsoft graph计划会议时的时区问题,microsoft-graph-api,microsoft-graph-calendar,Microsoft Graph Api,Microsoft Graph Calendar,当我使用Microsoft Graph Explorer安排新会议时,我的时间错了 如果我呼叫https://graph.microsoft.com/v1.0/me/mailboxsettings,我得到我的时区:“时区”:“W.欧洲标准时间” 如果我随后调用https://graph.microsoft.com/v1.0/me/events使用有效负载: { "subject": "My event W. Europe Standard Time 3", "start": {

当我使用Microsoft Graph Explorer安排新会议时,我的时间错了

如果我呼叫
https://graph.microsoft.com/v1.0/me/mailboxsettings
,我得到我的时区:
“时区”:“W.欧洲标准时间”

如果我随后调用
https://graph.microsoft.com/v1.0/me/events
使用有效负载:

{
  "subject": "My event W. Europe Standard Time 3",
  "start": {
    "dateTime": "2019-04-02T16:01:03.353Z",
    "timeZone": "W. Europe Standard Time"
  },
  "end": {
    "dateTime": "2019-04-02T16:47:03.353Z",
    "timeZone": "W. Europe Standard Time"
  }
}

我按预期在Outlook中获得了预定的会议,但时间不正确。我进入Outlook的时间是
18:10
18:47

当您在时间末尾放置
Z
时,您说的时间是UTC。您需要从时间中删除时区信息,以便将其视为本地时间:

{
  "subject": "My event W. Europe Standard Time 3",
  "start": {
    "dateTime": "2019-04-02T16:01:00",
    "timeZone": "W. Europe Standard Time"
  },
  "end": {
    "dateTime": "2019-04-02T16:47:00",
    "timeZone": "W. Europe Standard Time"
  }
}