Google PHP客户端库“全天”事件重复
这是我的密码Google PHP客户端库“全天”事件重复,php,google-api,Php,Google Api,这是我的密码 if($service instanceof Google_Service_Calendar and isset($_SESSION['service_token']) and $_SESSION['service_token'] != '' ) { $event = new Google_Service_Calendar_Event(); $event->setSumma
if($service instanceof Google_Service_Calendar and isset($_SESSION['service_token']) and $_SESSION['service_token'] != '' ) {
$event = new Google_Service_Calendar_Event();
$event->setSummary('AllDay Event Bug');
$start = new Google_Service_Calendar_EventDateTime();
$start->setDateTime(date('Y-m-d\TH:i:s',strtotime('2015-11-11 10:00:00')));
$start->setTimeZone('Australia/Melbourne');
$event->setStart($start);
$end = new Google_Service_Calendar_EventDateTime();
$end->setDateTime(date('Y-m-d\TH:i:s',strtotime('2015-11-16 11:00:00')));
$end->setTimeZone('Australia/Melbourne');
$event->setEnd($end);
if(recurring) {
$recurrenceUntil = date('Ymd\THis\Z',strtotime('2015-11-16 11:00:00'));
if(count($exDateArr) > 0) {
$exdate = "EXDATE:".implode(",", $exDateArr);
} else {
$exdate = '';
}
switch ($repeate) {
case "day":
$frequence = "DAILY";
break;
case "week":
$frequence = "WEEKLY";
break;
case "month":
$frequence = "MONTHLY";
break;
case "year":
$frequence = "YEARLY";
break;
}
$event->setRecurrence(
array(
"RRULE:FREQ=".$frequence.";UNTIL=".$recurrenceUntil.";INTERVAL=".$repeate_interval,
$exdate
)
);
}
$newEvent = $service->events->insert('primary', $event);
}
当我在谷歌日历中搜索该事件时,这就是我得到的结果
Wed Nov 11, 2015 10:00am – 11:00am AllDay Event Bug
Thu Nov 12, 2015 All day AllDay Event Bug
10:00am – 11:00am AllDay Event Bug
Fri Nov 13, 2015 All day AllDay Event Bug
All day AllDay Event Bug
10:00am – 11:00am AllDay Event Bug
Sat Nov 14, 2015 All day AllDay Event Bug
All day AllDay Event Bug
All day AllDay Event Bug
10:00am – 11:00am AllDay Event Bug
Sun Nov 15, 2015 All day AllDay Event Bug
All day AllDay Event Bug
All day AllDay Event Bug
All day AllDay Event Bug
10:00am – 11:00am AllDay Event Bug
Mon Nov 16, 2015 All day AllDay Event Bug
All day AllDay Event Bug
All day AllDay Event Bug
All day AllDay Event Bug
All day AllDay Event Bug
10:00am – 11:00am AllDay Event Bug
第一天一切都很好,第二天又增加了一个额外的全天活动,并且每天都在增加。有人能告诉我为什么会发生这种情况吗?
我正在使用Google服务帐户凭据,我添加的事件不是重复发生的事件,也没有例外日期