From b553ffd55d04d11c0802b1688d74e96f3ed01ddf Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 23 Sep 2015 20:59:19 -0700 Subject: timezone tweaks --- include/event.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include/event.php') diff --git a/include/event.php b/include/event.php index 44c172e98..f0a806dfa 100644 --- a/include/event.php +++ b/include/event.php @@ -526,13 +526,17 @@ function event_import_ical($ical, $uid) { // logger('dtstart: ' . var_export($dtstart,true)); - if(($dtstart->timezone_type == 2) || (($dtstart->timezone_type == 3) && ($dtstart->timezone === 'UTC'))) { - $ev['adjust'] = 1; - } - else { - $ev['adjust'] = 0; + + switch($dtstart->timezone_type) { + case VObject\Property\DateTime::UTC : + $ev['adjust'] = 0; + break; + case VObject\Property\DateTime::LOCALTZ : + default: + $ev['adjust'] = 1; + break; } - + $ev['start'] = datetime_convert((($ev['adjust']) ? 'UTC' : date_default_timezone_get()),'UTC', $dtstart->format(\DateTime::W3C)); -- cgit v1.2.3 From 2844f276b9af6154e36706b7fe53438352493d58 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Thu, 24 Sep 2015 16:57:17 -0700 Subject: Document the additional content export options --- include/event.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/event.php') diff --git a/include/event.php b/include/event.php index f0a806dfa..e303ad232 100644 --- a/include/event.php +++ b/include/event.php @@ -755,12 +755,15 @@ function event_store_item($arr, $event) { } } + + $item_arr = array(); $prefix = ''; // $birthday = false; if($event['type'] === 'birthday') { - $prefix = t('This event has been added to your calendar.'); + if(! is_sys_channel($arr['uid'])) + $prefix = t('This event has been added to your calendar.'); // $birthday = true; // The event is created on your own site by the system, but appears to belong -- cgit v1.2.3