diff --git a/public_html/classes/queries.php b/public_html/classes/queries.php
index fba5bef..65d8304 100644
--- a/public_html/classes/queries.php
+++ b/public_html/classes/queries.php
@@ -14,14 +14,14 @@ SELECT DISTINCT
WHERE
ce.conference_id = c.conference_id
AND
- ce.conference_event = 'conference expired')
+ ce.conference_event = 'conference created')
AS start,
(SELECT ce.time
FROM conference_events ce
WHERE
ce.conference_id = c.conference_id
AND
- ce.conference_event = 'conference created')
+ ce.conference_event = 'conference expired')
AS end,
c.conference_id,
c.conference_name,
diff --git a/public_html/pages/conferences.php b/public_html/pages/conferences.php
index ea4683d..2d7b5cd 100644
--- a/public_html/pages/conferences.php
+++ b/public_html/pages/conferences.php
@@ -256,11 +256,19 @@ if (isset($conference_id)) {
foreach ($search as $item) {
extract($item);
+
+ // we don't have duration field, so we calculate it
+ if (!empty($start) && !empty($end)) {
+ $duration = gmdate("H:i:s", abs(strtotime($end) - strtotime($start)));
+ } else {
+ $duration = '';
+ }
$conference_record = array(
// assign title to the field in the array record
'component' => $jitsi_component,
'start' => $start,
'end' => $end,
+ 'duration' => $duration,
'conference ID' => $conference_id,
'conference name' => $conference_name,
'participants' => $participants,