diff options
author | mrjive <mrjive@mrjive.it> | 2015-09-29 08:01:51 +0200 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-09-29 08:01:51 +0200 |
commit | 11c1573b55f278a664a90a2872d06a40b3ac3026 (patch) | |
tree | 4061879d490fec39ab01d3feeb575b86586fb7f8 /include/event.php | |
parent | 006ca4421a7027ccee4612beb99a1f9976146070 (diff) | |
parent | b3525b865784ff5d2d5a76b913b8c86d139cc0f3 (diff) | |
download | volse-hubzilla-11c1573b55f278a664a90a2872d06a40b3ac3026.tar.gz volse-hubzilla-11c1573b55f278a664a90a2872d06a40b3ac3026.tar.bz2 volse-hubzilla-11c1573b55f278a664a90a2872d06a40b3ac3026.zip |
Merge pull request #5 from redmatrix/master
updating from original codebase
Diffstat (limited to 'include/event.php')
-rw-r--r-- | include/event.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/include/event.php b/include/event.php index 44c172e98..e303ad232 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)); @@ -751,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 |