aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-04-03 22:01:24 +0200
committerMario <mario@mariovavti.com>2020-04-03 22:01:24 +0200
commita4831b0f7c608a4337954dfe0ad84486bdc606d6 (patch)
treed1d2dc18e30522da4f331160fb75ea9ac56641a7 /Zotlabs
parentec9418b2626f343614b3307902551ea68307002c (diff)
downloadvolse-hubzilla-a4831b0f7c608a4337954dfe0ad84486bdc606d6.tar.gz
volse-hubzilla-a4831b0f7c608a4337954dfe0ad84486bdc606d6.tar.bz2
volse-hubzilla-a4831b0f7c608a4337954dfe0ad84486bdc606d6.zip
Revert "use timezone info for timezone display only- the actual time is in utc already."
This reverts commit 625438ff642381472b4ba6c86bad7f26f69e8083
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Channel_calendar.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/Zotlabs/Module/Channel_calendar.php b/Zotlabs/Module/Channel_calendar.php
index 87dd2ffb6..c92e6ca1b 100644
--- a/Zotlabs/Module/Channel_calendar.php
+++ b/Zotlabs/Module/Channel_calendar.php
@@ -337,15 +337,21 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
}
$events = [];
+
if($r) {
foreach($r as $rr) {
- $start = (($rr['adjust']) ? datetime_convert('UTC', date_default_timezone_get(), $rr['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtstart'], 'c'));
+ $tz = get_iconfig($rr, 'event', 'timezone');
+
+ if(! $tz)
+ $tz = 'UTC';
+
+ $start = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtstart'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtstart'], 'c'));
if ($rr['nofinish']){
$end = null;
} else {
- $end = (($rr['adjust']) ? datetime_convert('UTC', date_default_timezone_get(), $rr['dtend'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtend'], 'c'));
+ $end = (($rr['adjust']) ? datetime_convert($tz, date_default_timezone_get(), $rr['dtend'], 'c') : datetime_convert('UTC', 'UTC', $rr['dtend'], 'c'));
}
$catsenabled = feature_enabled(local_channel(),'categories');
@@ -365,14 +371,12 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
$drop = array(z_root().'/events/drop/'.$rr['event_hash'],t('Delete event'),'','');
- $tz = get_iconfig($rr, 'event', 'timezone');
-
$events[] = array(
'calendar_id' => 'channel_calendar',
'rw' => true,
'id'=>$rr['id'],
'uri' => $rr['event_hash'],
- 'timezone' => (($tz) ? $tz : 'UTC'),
+ 'timezone' => $tz,
'start'=> $start,
'end' => $end,
'drop' => $drop,