Adds conference duration calculation

main
Yasen Pramatarov 2024-07-10 15:52:13 +03:00
parent e85e9c577f
commit 2496d3fc93
2 changed files with 10 additions and 2 deletions

View File

@ -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,

View File

@ -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,