Fixes error in conference duration calculation

main
Yasen Pramatarov 2024-07-10 15:50:22 +03:00
parent 97f0f5655e
commit f0c093ade7
1 changed files with 3 additions and 3 deletions

View File

@ -58,14 +58,14 @@ SELECT DISTINCT
WHERE WHERE
ce.conference_id = c.conference_id ce.conference_id = c.conference_id
AND AND
ce.conference_event = 'conference expired') ce.conference_event = 'conference created')
AS start, AS start,
(SELECT ce.time (SELECT ce.time
FROM conference_events ce FROM conference_events ce
WHERE WHERE
ce.conference_id = c.conference_id ce.conference_id = c.conference_id
AND AND
ce.conference_event = 'conference created') ce.conference_event = 'conference expired')
AS end, AS end,
c.conference_id, c.conference_id,
c.conference_name, c.conference_name,
@ -805,7 +805,7 @@ if [[ "$conference_option" == true ]]; then
fi fi
# prepare the formatted rows # prepare the formatted rows
for row in "${conference_array[@]}"; do for row in "${conference_array[@]}"; do
IFS='|' read -r jitsi_component end start conference_id conference_name participants name_count conference_host <<< "$row" IFS='|' read -r jitsi_component start end conference_id conference_name participants name_count conference_host <<< "$row"
calculate_duration "$start" "$end" calculate_duration "$start" "$end"
output+="$jitsi_component\t$duration\t$conference_id\t$conference_name\t$participants\t$name_count\t$conference_host\n" output+="$jitsi_component\t$duration\t$conference_id\t$conference_name\t$participants\t$name_count\t$conference_host\n"
done done