创建没有Recurrence.Range.End日期的日历事件失败,并显示以下消息:
{
"error": {
"code": "ErrorRecurrenceEndDateTooBig",
"message": "Recurrence end date can not exceed Sep 1, 4500 00:00:00."
}
}
我尝试将此日期设置为UTC零日期并删除参数。此问题可能与this post.
有关请求示例:
1)没有Recurrence.Range.End:
{
"Subject": "test event",
"Body": {
"ContentType": "HTML",
"Content": "sadsad"
},
"Start": "2015-05-27T00:00:00.000Z",
"End": "2015-05-27T00:30:00.000Z",
"Attendees": [],
"Recurrence": {
"Pattern": {
"DayOfMonth": 0,
"Month": 0,
"Type": "Daily",
"Interval": 3,
"FirstDayOfWeek": "Sunday"
},
"Range": {
"NumberOfOccurrences": 0,
"Type": "NoEnd"
}
}
}
2)使用Recurrence.Range.Start:
{
"Subject": "No title",
"Body": {
"ContentType": "HTML",
"Content": "sadsad"
},
"Start": "2015-05-27T03:30:00.000Z",
"End": "2015-05-27T04:00:00.000Z",
"Attendees": [],
"Recurrence": {
"Pattern": {
"DayOfMonth": 0,
"Month": 0,
"Type": "Daily",
"Interval": 3,
"FirstDayOfWeek": "Sunday"
},
"Range": {
//Actually this is the way this field comes when reading such
//events from the REST API, which is a bit strange:
"EndDate": "0001-01-01T00:00:00Z",
"NumberOfOccurrences": 0,
"Type": "NoEnd"
}
}
}
有人可以检查我是否遗漏了某些东西或者这是一个问题(bug)?感谢。
答案 0 :(得分:2)
您需要在StartDate
中添加Range
字段。
"Range": {
"StartDate": "2015-05-27T00:00:00Z",
"EndDate": "0001-01-01T00:00:00Z",
"NumberOfOccurrences": 0,
"Type": "NoEnd"
}