aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-10-05 10:31:11 +0200
committerMario <mario@mariovavti.com>2019-10-05 10:31:11 +0200
commitd6da46f94b5f4224f5013c1904a7e2c71911c74d (patch)
tree8390a309739ad1e6072633cb4f4b17ff2d88db23
parent58b77e3427ef5130ca07ebaf73d86cbaff4863cd (diff)
parent562e39c9c5d79823b047886dbfb87deee3f4ca01 (diff)
downloadvolse-hubzilla-d6da46f94b5f4224f5013c1904a7e2c71911c74d.tar.gz
volse-hubzilla-d6da46f94b5f4224f5013c1904a7e2c71911c74d.tar.bz2
volse-hubzilla-d6da46f94b5f4224f5013c1904a7e2c71911c74d.zip
Merge branch 'dev' into 'dev'
another timezone fix See merge request hubzilla/core!1748
-rw-r--r--Zotlabs/Lib/Activity.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index b74f6b2bc..b869c55b5 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -202,6 +202,11 @@ class Activity {
$ev = bbtoevent($x['content']);
if($ev) {
+
+ if (! $ev['timezone']) {
+ $ev['timezone'] = 'UTC';
+ }
+
$actor = null;
if(array_key_exists('author',$x) && array_key_exists('link',$x['author'])) {
$actor = $x['author']['link'][0]['href'];
@@ -212,14 +217,14 @@ class Activity {
'name' => $ev['summary'],
// 'summary' => bbcode($ev['summary'], [ 'cache' => true ]),
// RFC3339 Section 4.3
- 'startTime' => (($ev['adjust']) ? datetime_convert('UTC','UTC',$ev['dtstart'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtstart'],'Y-m-d\\TH:i:s-00:00')),
+ 'startTime' => (($ev['adjust']) ? datetime_convert($ev['timezone'],'UTC',$ev['dtstart'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtstart'],'Y-m-d\\TH:i:s-00:00')),
'content' => bbcode($ev['description'], [ 'cache' => true ]),
'location' => [ 'type' => 'Place', 'content' => bbcode($ev['location'], [ 'cache' => true ]) ],
'source' => [ 'content' => format_event_bbcode($ev), 'mediaType' => 'text/bbcode' ],
'actor' => $actor,
];
if(! $ev['nofinish']) {
- $y['endTime'] = (($ev['adjust']) ? datetime_convert('UTC','UTC',$ev['dtend'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtend'],'Y-m-d\\TH:i:s-00:00'));
+ $y['endTime'] = (($ev['adjust']) ? datetime_convert($ev['timezone'],'UTC',$ev['dtend'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtend'],'Y-m-d\\TH:i:s-00:00'));
}
// copy attachments from the passed object - these are already formatted for ActivityStreams