improve timezone detection for caldav and remove smart birthday feature. Force adjust birthdays until we agree on how to deal with this.

This commit is contained in:
Mario Vavti
2019-05-22 12:40:37 +02:00
parent e834c7fe3e
commit 39613aa2d9
5 changed files with 27 additions and 18 deletions

View File

@@ -1144,16 +1144,24 @@ class Cdav extends Controller {
$dtend = (string)$vevent->DTEND;
$description = (string)$vevent->DESCRIPTION;
$location = (string)$vevent->LOCATION;
$timezone = (string)$vevent->DTSTART['TZID'];
$timezone_str = (string)$vevent->DTSTART['TZID'];
$rw = ((cdav_perms($id[0],$calendars,true)) ? true : false);
$editable = $rw ? true : false;
$recurrent = ((isset($vevent->{'RECURRENCE-ID'})) ? true : false);
if($recurrent) {
$editable = false;
$timezone = $recurrent_timezone;
$timezone_str = $recurrent_timezone;
}
// Try to get an usable olson format timezone
$timezone_obj = \Sabre\VObject\TimeZoneUtil::getTimeZone($timezone_str, $vcalendar);
$timezone = $timezone_obj->getName();
// If we got nothing fallback to UTC
if(! $timezone)
$timezone = 'UTC';
$allDay = (((string)$vevent->DTSTART['VALUE'] == 'DATE') ? true : false);
$events[] = [