向日历javascript添加事件的Google API
我正在尝试使用javascript添加新事件:向日历javascript添加事件的Google API,javascript,events,calendar,recurrence,Javascript,Events,Calendar,Recurrence,我正在尝试使用javascript添加新事件: new_event = { "summary": 'new event' "location": 'Somewhere' "start": { "dateTime": "2015-01-14T17:00:00.000Z"
new_event = {
"summary": 'new event'
"location": 'Somewhere'
"start": {
"dateTime": "2015-01-14T17:00:00.000Z"
},
"end": {
"dateTime": "2015-01-14T18:00:00.000Z"
},
"reminders": {
"useDefault": false
}
}
执行请求后,我得到两个相同的事件。
如果我尝试添加重复
new_event = {
"summary": 'new event'
"location": 'Somewhere'
"start": {
"dateTime": "2015-01-14T17:00:00.000Z"
},
"end": {
"dateTime": "2015-01-14T18:00:00.000Z"
},
"reminders": {
"useDefault": false
},
"recurrence": ["RRULE:FREQ=DAILY;INTERVAL=1;RANGE=ENDAFTER;COUNT=4"]
}
我得到以下错误:
代码:400,消息:“缺少开始时间的时区定义”我解决了“缺少开始时间的时区定义”错误。必须提供时区,以防再次发生。但我不明白为什么我在一个请求中得到两个相同的事件