我对使用Outlook API特别与Calendar API有关的问题。日历中的Outlook API时间差异
我用UTC格式发送日期,当它们添加到日历中时,我与发送日期有所不同。
我在法国,所以原始日期是UTC + 2。我转换成UTC,让我这个配置要求:
var options = {
url: "https://outlook.office.com/api/v2.0/me/calendars/" + workspace.calendarId + "/events?$Select=Id",
method: "POST",
headers: {
"authorization": "Bearer " + host.outlookCalAccessToken,
"accept" : "application/json",
"ContentType" : "application/json"
},
json:{
"Subject" : event.summary,
"Body" : {
"ContentType" : "Text",
"Content" : event.description
},
"Start" : {
"DateTime":start,
"TimeZone" : "OriginStartTimeZone"
},
"End" : {
"DateTime":end,
"TimeZone" : "OriginStartTimeZone"
},
"Attendees" : [
{
"EmailAddress" : {
"Name" : nomad.firstname,
"Address" : nomad.email
},
"Type" : "Required"
}
]
},
"Content-Type" : "application/json"
};
我有同样的问题,如果时区为“OriginStartTimeZone”或“UTC”。
例如,我的本地日期是2017-10-19T17:00:00.000
它转换为UTC 2017-10-19T15:00:00.000Z
而在日历事件日期是2017-10-19T08:00:00.000
有什么我错过了这个API?
谢谢!