Fix #6: Correct inclusive end date of caldav for allday events
This commit is contained in:
parent
ad31194e03
commit
3fa3b47e06
1 changed files with 11 additions and 0 deletions
|
@ -2177,6 +2177,17 @@ else {
|
|||
|
||||
foreach($updates as $update)
|
||||
{
|
||||
if($update['remote_event']['allday'])
|
||||
{
|
||||
//caldav has exclusive end dates set to midnight of the next day.
|
||||
//But we need it inclusive, so we just reduce it by an hour:
|
||||
|
||||
$old = $update['remote_event']['end'];
|
||||
$new = new DateTime('now', $old->getTimezone());
|
||||
$new->setTimestamp($old->getTimestamp() - 3600);
|
||||
$update['remote_event']['end'] = $new;
|
||||
}
|
||||
|
||||
// local event -> update event
|
||||
if(isset($update["local_event"]))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue