From 755f5aaf66b63cb6c9c9dfdf757b4f8fe1e5c791 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 10 May 2021 11:30:22 -0600 Subject: [PATCH] Use the database for formatted date and time. --- app/xml_cdr/xml_cdr.php | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index adf9c25588..e74cf43e5a 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -629,17 +629,6 @@ //loop through the results $x = 0; foreach ($result as $index => $row) { - //get the date and time - $tmp_year = date("Y", strtotime($row['start_stamp'])); - $tmp_month = date("M", strtotime($row['start_stamp'])); - $tmp_day = date("d", strtotime($row['start_stamp'])); - $tmp_start_epoch_date = escape(date("j M Y", $row['start_epoch'])); - if ($_SESSION['domain']['time_format']['text'] == '12h') { - $tmp_start_epoch_time = escape(date("g:i:s a", $row['start_epoch'])); - } - else { - $tmp_start_epoch_time = escape(date("H:i:s", $row['start_epoch'])); - } //get the hangup cause $hangup_cause = $row['hangup_cause']; @@ -791,8 +780,8 @@ } //start if (permission_exists('xml_cdr_start')) { - $content .= " ".$tmp_start_epoch_date."\n"; - $content .= " ".$tmp_start_epoch_time."\n"; + $content .= " ".$row['start_date_formatted']."\n"; + $content .= " ".$row['start_time_formatted']."\n"; } //tta (time to answer) if (permission_exists('xml_cdr_tta')) {