Google calendar api 为什么扩展搜索条件(时间)实际上是过滤谷歌日历中的事件?

Google calendar api 为什么扩展搜索条件(时间)实际上是过滤谷歌日历中的事件?,google-calendar-api,Google Calendar Api,首先,我正在使用以下工具搜索自己的日历: DateTime min = new DateTime(System.currentTimeMillis() - 3600000); DateTime max = new DateTime(System.currentTimeMillis() + 400000000); calendarService.events().list("primary").setTimeMin(min).setTimeMax(max).setSingleEvents(fal

首先,我正在使用以下工具搜索自己的日历:

DateTime min = new DateTime(System.currentTimeMillis() - 3600000);
DateTime max = new DateTime(System.currentTimeMillis() + 400000000);

calendarService.events().list("primary").setTimeMin(min).setTimeMax(max).setSingleEvents(false).setShowDeleted(false).execute()
我得到了这两个事件:

Event ID: ttnt08g1300qmc9m92ia2s8a3g_20170517T101500Z
Summary: null
Status: cancelled
Event Start/End: null null
Recurrence: null
RecurringEventId: ttnt08g1300qmc9m92ia2s8a3g

Event ID: cq61agdr4sbdnfj7rfbpbk2pro 
Summary: Google Calendar API test event 
Status: confirmed 
Event Start/End: {"dateTime":"2017-05-17T15:24:53.000+02:00","timeZone":"Europe/Berlin"} {"dateTime":"2017-05-17T16:24:53.000+02:00","timeZone":"Europe/Berlin"}
Recurrence: RRULE:FREQ=DAILY;COUNT=3
RecurringEventId: null
然后我展开搜索条件(请注意
min
objectvalue)并执行相同的查询,然后我得到的结果就少了一个

DateTime min = new DateTime(System.currentTimeMillis() - 400000000);
DateTime max = new DateTime(System.currentTimeMillis() + 400000000);
然后只返回

Event ID: cq61agdr4sbdnfj7rfbpbk2pro 
Summary: Google Calendar API test event 
Status: confirmed 
Event Start/End: {"dateTime":"2017-05-17T15:24:53.000+02:00","timeZone":"Europe/Berlin"} {"dateTime":"2017-05-17T16:24:53.000+02:00","timeZone":"Europe/Berlin"}
Recurrence: [RRULE:FREQ=DAILY;COUNT=3]
RecurringEventId: null

我的问题是,为什么从
当前时间-400000000开始搜索时,比从
当前时间-3600000开始搜索时少了一个事件?

实际上更令人困惑的是,为什么一个状态为
已取消的事件返回时请求已
显示已删除
false
。当您恢复到上一个请求(
min
as
3600000
)时,它还会出现吗?Hello@AL。我也认为这很奇怪,但他们的API文档中提到了这一点:showDeleted:是否在结果中包含已删除事件(状态等于“取消”)。如果showDeleted和singleEvents均为False,则已取消的定期事件实例(但不是基础定期事件)仍将包括在内。如果showDeleted和singleEvents均为True,则只返回已删除事件的单个实例(但不返回基础定期事件)。可选。默认值为False。