diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/event.php | 10 |
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]'; |