diff options
author | zotlabs <mike@macgirvin.com> | 2019-10-03 22:16:11 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-10-03 22:16:11 -0700 |
commit | b9dec84489fc90cb43ac9c219c77eb82f52d857b (patch) | |
tree | c946def0fffeeb3b89927b8de837ae279b035fd7 | |
parent | 02f5fa32af4708877c89a50d5fa8849f6d9e038e (diff) | |
download | volse-hubzilla-b9dec84489fc90cb43ac9c219c77eb82f52d857b.tar.gz volse-hubzilla-b9dec84489fc90cb43ac9c219c77eb82f52d857b.tar.bz2 volse-hubzilla-b9dec84489fc90cb43ac9c219c77eb82f52d857b.zip |
fix event timezones for zot6
-rw-r--r-- | Zotlabs/Lib/Activity.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index b74f6b2bc..d1fa8e49e 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -202,6 +202,19 @@ class Activity { $ev = bbtoevent($x['content']); if($ev) { + $t = q("select id from item where resource_type = 'event' and resource_id = '%s'", + dbesc($ev['event_hash']) + ); + if($t) + $tz = get_iconfig($t[0]['id'],'event','timezone','UTC'); + if(! $tz) + $tz = 'UTC'; + + $ev['dtstart'] = datetime_convert($tz,'UTC',$ev['dtstart'], ATOM_TIME); + if (! $ev['nofinish']) { + $ev['dtend'] = datetime_convert($tz,'UTC',$ev['dtend'], ATOM_TIME); + } + $actor = null; if(array_key_exists('author',$x) && array_key_exists('link',$x['author'])) { $actor = $x['author']['link'][0]['href']; |