diff options
author | Mario <mario@mariovavti.com> | 2020-04-05 09:11:12 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-04-05 09:11:12 +0000 |
commit | 84183d9f7ef669779841cfccd65aae8000012e6d (patch) | |
tree | 5b0e5d65b73dbe3f2b560ad59551665c885726a7 /Zotlabs/Module | |
parent | 805f8bf98377d17593dfe884eac5c69079b83eed (diff) | |
download | volse-hubzilla-84183d9f7ef669779841cfccd65aae8000012e6d.tar.gz volse-hubzilla-84183d9f7ef669779841cfccd65aae8000012e6d.tar.bz2 volse-hubzilla-84183d9f7ef669779841cfccd65aae8000012e6d.zip |
show event timezone only if adjust ist set and the offset of the event timezone is different from the channel default timezone offset
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Channel_calendar.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Module/Channel_calendar.php b/Zotlabs/Module/Channel_calendar.php index f83a0167d..5d5fe300a 100644 --- a/Zotlabs/Module/Channel_calendar.php +++ b/Zotlabs/Module/Channel_calendar.php @@ -27,9 +27,6 @@ class Channel_calendar extends \Zotlabs\Web\Controller { if(($xchan) && ($xchan !== get_observer_hash())) return; - $timezone = ((x($_POST,'timezone_select')) ? escape_tags(trim($_POST['timezone_select'])) : ''); - $tz = (($timezone) ? $timezone : date_default_timezone_get()); - $categories = escape_tags(trim($_POST['categories'])); // allday events have adjust = 0, normal events have adjust = 1 @@ -38,6 +35,12 @@ class Channel_calendar extends \Zotlabs\Web\Controller { $start = datetime_convert((($adjust) ? $tz : 'UTC'), 'UTC', escape_tags($_REQUEST['dtstart'])); $finish = datetime_convert((($adjust) ? $tz : 'UTC'), 'UTC', escape_tags($_REQUEST['dtend'])); + $timezone = ((x($_POST,'timezone_select')) ? escape_tags(trim($_POST['timezone_select'])) : ''); + $tz = (($timezone) ? $timezone : date_default_timezone_get()); + + if(! $adjust) + $tz = 'UTC'; + $summary = escape_tags(trim($_POST['summary'])); $desc = escape_tags(trim($_POST['desc'])); $location = escape_tags(trim($_POST['location'])); |