aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2020-01-14 13:29:45 -0800
committerzotlabs <mike@macgirvin.com>2020-01-14 13:29:45 -0800
commit2a287e6def5ab54037222c963ab0875faf62fc1a (patch)
tree6ab43926784d89f8177eec32e068c26894655876 /include
parentd3cbbe029c1f19a77ac0c278f735d81b9dd3a3ec (diff)
downloadvolse-hubzilla-2a287e6def5ab54037222c963ab0875faf62fc1a.tar.gz
volse-hubzilla-2a287e6def5ab54037222c963ab0875faf62fc1a.tar.bz2
volse-hubzilla-2a287e6def5ab54037222c963ab0875faf62fc1a.zip
event compatibility work
Diffstat (limited to 'include')
-rw-r--r--include/event.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/event.php b/include/event.php
index 30dca2df2..59057e7d5 100644
--- a/include/event.php
+++ b/include/event.php
@@ -250,7 +250,7 @@ function format_ical_sourcetext($s) {
}
-function format_event_bbcode($ev) {
+function format_event_bbcode($ev, $utc = false) {
$o = '';
@@ -258,6 +258,14 @@ function format_event_bbcode($ev) {
$o .= '[event]' . $ev['event_vdata'] . '[/event]';
}
+ if ($utc && $ev['event-timezone'] !== 'UTC') {
+ $ev['dtstart'] = datetime_convert($ev['timezone'],'UTC',$ev['dtstart'],ATOM_TIME);
+ if ($ev['dtend'] && ! $ev['nofinish']) {
+ $ev['dtend'] = datetime_convert($ev['timezone'],'UTC',$ev['dtend'],ATOM_TIME);
+ }
+ $ev['timezone'] = 'UTC';
+ }
+
if($ev['summary'])
$o .= '[event-summary]' . $ev['summary'] . '[/event-summary]';