diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-09-24 23:32:18 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-09-24 23:32:18 +0200 |
commit | 414b5ea6f3ad616c5211b0e9d4b811c149decf26 (patch) | |
tree | 58d7a19079cc1c7de0790b0e2f3b829967344ea1 /include/event.php | |
parent | 8cbccb20ef7f1fa82c4a16c6c786d5d748901c02 (diff) | |
parent | c42dcd5ac9c63cd42c7af1b2765dd33e7e9f5d6d (diff) | |
download | volse-hubzilla-414b5ea6f3ad616c5211b0e9d4b811c149decf26.tar.gz volse-hubzilla-414b5ea6f3ad616c5211b0e9d4b811c149decf26.tar.bz2 volse-hubzilla-414b5ea6f3ad616c5211b0e9d4b811c149decf26.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/event.php')
-rw-r--r-- | include/event.php | 16 |
1 files changed, 10 insertions, 6 deletions
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)); |