From 3940fb8219991b95d21c8c02aee191860d0088f9 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 26 Dec 2024 10:58:59 -0700 Subject: [PATCH] Fix the duration using the created_epoch --- app/calls_active/calls_active_inc.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/calls_active/calls_active_inc.php b/app/calls_active/calls_active_inc.php index 567951aa52..b804f9722d 100644 --- a/app/calls_active/calls_active_inc.php +++ b/app/calls_active/calls_active_inc.php @@ -230,14 +230,8 @@ } } - //convert $created to a UNIX timestamp - $created_timestamp = strtotime($created); - - //get the current timestamp - $now = time(); - //calculate elapsed seconds - $elapsed_seconds = $now - $created_timestamp; + $elapsed_seconds = time() - $created_epoch; //convert seconds to hours, minutes, and seconds $hours = floor($elapsed_seconds / 3600);