move smart birthday feature to calendar settings and override the adjust flag at display time instead of import

This commit is contained in:
Mario Vavti
2019-05-20 13:51:53 +02:00
parent 9651689bb8
commit c9d64d75f3
3 changed files with 12 additions and 9 deletions

View File

@@ -345,6 +345,9 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
if(! $tz)
$tz = 'UTC';
if($rr['etype'] === 'birthday')
$rr['adjust'] = intval(feature_enabled(local_channel(), 'smart_birthdays'));
$start = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtstart'], 'c'));
if ($rr['nofinish']){
$end = null;