Simplify the time format
This commit is contained in:
parent
53f6f040c1
commit
61d40a62ee
|
|
@ -28,11 +28,17 @@
|
|||
//if also viewing system status, show more recent calls (more room avaialble)
|
||||
$missed_limit = !empty($selected_blocks) && (is_array($selected_blocks) && in_array('counts', $selected_blocks)) ? 10 : 5;
|
||||
|
||||
//set the sql time format
|
||||
$sql_time_format = 'DD Mon HH12:MI am';
|
||||
if (!empty($_SESSION['domain']['time_format']['text'])) {
|
||||
$sql_time_format = $_SESSION['domain']['time_format']['text'] == '12h' ? "DD Mon HH12:MI am" : "DD Mon HH24:MI";
|
||||
}
|
||||
|
||||
//get the missed calls from call detail records
|
||||
$sql = "select \n";
|
||||
$sql .= " status, \n";
|
||||
$sql .= " direction, \n";
|
||||
$sql .= " to_char(timezone(:time_zone, start_stamp), '".(!empty($_SESSION['domain']['time_format']) && $_SESSION['domain']['time_format']['text'] == '12h' ? "DD Mon HH12:MI am" : "DD Mon HH24:MI")."') as start_date_time, \n";
|
||||
$sql .= " to_char(timezone(:time_zone, start_stamp), '".$sql_time_format."') as start_date_time, \n";
|
||||
$sql .= " caller_id_name, \n";
|
||||
$sql .= " caller_id_number, \n";
|
||||
$sql .= " answer_stamp \n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue