Use the domain time_format 12h or 24h
This commit is contained in:
parent
61d40a62ee
commit
76bcd70824
|
|
@ -229,7 +229,7 @@
|
||||||
|
|
||||||
//prepare to page the results
|
//prepare to page the results
|
||||||
//$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; //set on the page that includes this page
|
//$rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; //set on the page that includes this page
|
||||||
if (empty($_GET['page']) || (!empty($_GET['page']) && !is_numeric($_GET['page']))) {
|
if (empty($_GET['page']) || (!empty($_GET['page']) && !is_numeric($_GET['page']))) {
|
||||||
$_GET['page'] = 0;
|
$_GET['page'] = 0;
|
||||||
}
|
}
|
||||||
//ensure page is within bounds of integer
|
//ensure page is within bounds of integer
|
||||||
|
|
@ -245,6 +245,12 @@
|
||||||
}
|
}
|
||||||
$parameters['time_zone'] = $time_zone;
|
$parameters['time_zone'] = $time_zone;
|
||||||
|
|
||||||
|
//set the sql time format
|
||||||
|
$sql_time_format = 'HH12:MI am';
|
||||||
|
if (!empty($_SESSION['domain']['time_format']['text'])) {
|
||||||
|
$sql_time_format = $_SESSION['domain']['time_format']['text'] == '12h' ? "HH12:MI am" : "HH24:MI";
|
||||||
|
}
|
||||||
|
|
||||||
//get the results from the db
|
//get the results from the db
|
||||||
$sql = "select \n";
|
$sql = "select \n";
|
||||||
$sql .= "c.domain_uuid, \n";
|
$sql .= "c.domain_uuid, \n";
|
||||||
|
|
@ -253,7 +259,7 @@
|
||||||
$sql .= "c.start_stamp, \n";
|
$sql .= "c.start_stamp, \n";
|
||||||
$sql .= "c.end_stamp, \n";
|
$sql .= "c.end_stamp, \n";
|
||||||
$sql .= "to_char(timezone(:time_zone, start_stamp), 'DD Mon YYYY') as start_date_formatted, \n";
|
$sql .= "to_char(timezone(:time_zone, start_stamp), 'DD Mon YYYY') as start_date_formatted, \n";
|
||||||
$sql .= "to_char(timezone(:time_zone, start_stamp), 'HH12:MI:SS am') as start_time_formatted, \n";
|
$sql .= "to_char(timezone(:time_zone, start_stamp), '".$sql_time_format."') as start_time_formatted, \n";
|
||||||
$sql .= "c.start_epoch, \n";
|
$sql .= "c.start_epoch, \n";
|
||||||
$sql .= "c.hangup_cause, \n";
|
$sql .= "c.hangup_cause, \n";
|
||||||
$sql .= "c.billsec as duration, \n";
|
$sql .= "c.billsec as duration, \n";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue