diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-09-23 20:59:19 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-09-23 20:59:19 -0700 |
commit | b553ffd55d04d11c0802b1688d74e96f3ed01ddf (patch) | |
tree | 04509d4b92b35a2ed0cfd77c9e96996462f264f0 /include | |
parent | e45958b967d3b455167191fa91b0c2b6983b6ad5 (diff) | |
download | volse-hubzilla-b553ffd55d04d11c0802b1688d74e96f3ed01ddf.tar.gz volse-hubzilla-b553ffd55d04d11c0802b1688d74e96f3ed01ddf.tar.bz2 volse-hubzilla-b553ffd55d04d11c0802b1688d74e96f3ed01ddf.zip |
timezone tweaks
Diffstat (limited to 'include')
-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)); |