Use the database for formatted date and time.

This commit is contained in:
FusionPBX
2021-05-10 11:30:22 -06:00
committed by GitHub
parent 49cf078c5c
commit 755f5aaf66

View File

@@ -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 .= " <td class='middle right no-wrap'>".$tmp_start_epoch_date."</td>\n";
$content .= " <td class='middle right no-wrap hide-md-dn'>".$tmp_start_epoch_time."</td>\n";
$content .= " <td class='middle right no-wrap'>".$row['start_date_formatted']."</td>\n";
$content .= " <td class='middle right no-wrap hide-md-dn'>".$row['start_time_formatted']."</td>\n";
}
//tta (time to answer)
if (permission_exists('xml_cdr_tta')) {