aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Events.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2017-01-02 07:56:23 -0500
committerAndrew Manning <tamanning@zoho.com>2017-01-02 07:56:23 -0500
commitbc0d4f28efe12601fde58d2f01f2d4834c1b7dc1 (patch)
tree9d8f0ab7b9af8f680547af6a997a9a71ab8ce3a3 /Zotlabs/Module/Events.php
parent7b11e634aa570f4aca98c55abc802527d12d5be1 (diff)
parent369a29ac909a67813390b4ebbcda78d1a7033505 (diff)
downloadvolse-hubzilla-bc0d4f28efe12601fde58d2f01f2d4834c1b7dc1.tar.gz
volse-hubzilla-bc0d4f28efe12601fde58d2f01f2d4834c1b7dc1.tar.bz2
volse-hubzilla-bc0d4f28efe12601fde58d2f01f2d4834c1b7dc1.zip
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'Zotlabs/Module/Events.php')
-rw-r--r--Zotlabs/Module/Events.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php
index 863bdf3cb..c3d1dd89c 100644
--- a/Zotlabs/Module/Events.php
+++ b/Zotlabs/Module/Events.php
@@ -43,6 +43,10 @@ class Events extends \Zotlabs\Web\Controller {
$adjust = intval($_POST['adjust']);
$nofinish = intval($_POST['nofinish']);
+ $timezone = ((x($_POST,'timezone_select')) ? notags(trim($_POST['timezone_select'])) : '');
+
+ $tz = (($timezone) ? $timezone : date_default_timezone_get());
+
$categories = escape_tags(trim($_POST['category']));
// only allow editing your own events.
@@ -71,9 +75,9 @@ class Events extends \Zotlabs\Web\Controller {
if($adjust) {
- $start = datetime_convert(date_default_timezone_get(),'UTC',$start);
+ $start = datetime_convert($tz,'UTC',$start);
if(! $nofinish)
- $finish = datetime_convert(date_default_timezone_get(),'UTC',$finish);
+ $finish = datetime_convert($tz,'UTC',$finish);
}
else {
$start = datetime_convert('UTC','UTC',$start);
@@ -478,6 +482,8 @@ class Events extends \Zotlabs\Web\Controller {
'$allow_gid' => acl2json($permissions['allow_gid']),
'$deny_cid' => acl2json($permissions['deny_cid']),
'$deny_gid' => acl2json($permissions['deny_gid']),
+ '$tz_choose' => feature_enabled(local_channel(),'event_tz_select'),
+ '$timezone' => array('timezone_select' , t('Timezone:'), date_default_timezone_get(), '', get_timezones()),
'$lockstate' => (($acl->is_private()) ? 'lock' : 'unlock'),