aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Channel_calendar.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-04-05 09:11:12 +0000
committerMario <mario@mariovavti.com>2020-04-05 09:11:12 +0000
commit84183d9f7ef669779841cfccd65aae8000012e6d (patch)
tree5b0e5d65b73dbe3f2b560ad59551665c885726a7 /Zotlabs/Module/Channel_calendar.php
parent805f8bf98377d17593dfe884eac5c69079b83eed (diff)
downloadvolse-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/Channel_calendar.php')
-rw-r--r--Zotlabs/Module/Channel_calendar.php9
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']));