Fix the destination summary when server using UTC
Set the PHP time zone to fix the destination summary report. Without the time zone set it would use the server operating system time zone. If the time zone is set to UTC when it rolled over to a new date ahead of the local time zone it would make the report show 0 results.
This commit is contained in:
parent
139867815f
commit
318953bddf
|
|
@ -1134,6 +1134,9 @@ if (!class_exists('destinations')) {
|
|||
$time_zone = date_default_timezone_get();
|
||||
}
|
||||
|
||||
//set the time zone for php
|
||||
date_default_timezone_set($time_zone);
|
||||
|
||||
//build the date range
|
||||
if (!empty($this->start_stamp_begin) || !empty($this->start_stamp_end)) {
|
||||
unset($this->quick_select);
|
||||
|
|
@ -1236,6 +1239,7 @@ if (!class_exists('destinations')) {
|
|||
}
|
||||
$sql .= " and direction = 'inbound' \n";
|
||||
$sql .= " and caller_destination is not null \n";
|
||||
$sql .= " leg = 'a' \n";
|
||||
$sql .= $sql_date_range ?? '';
|
||||
$sql .= ") as c \n";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue