Skip to content
Snippets Groups Projects
Commit 69b17888 authored by aydreeihn's avatar aydreeihn
Browse files

filter service/response time by date range chosen

parent 00e9811d
No related branches found
No related tags found
No related merge requests found
...@@ -153,6 +153,9 @@ class OverviewReport { ...@@ -153,6 +153,9 @@ class OverviewReport {
'annulled' => 0, 'annulled' => 0,
), ),
)) ))
->filter(array(
'timestamp__range' => array($start, $stop, true),
))
->aggregate(array( ->aggregate(array(
'ServiceTime' => SqlAggregate::AVG(SqlFunction::timestampdiff( 'ServiceTime' => SqlAggregate::AVG(SqlFunction::timestampdiff(
new SqlCode('HOUR'), new SqlField('thread__events__timestamp'), new SqlField('timestamp')) new SqlCode('HOUR'), new SqlField('thread__events__timestamp'), new SqlField('timestamp'))
......
...@@ -75,11 +75,11 @@ $plots = $report->getPlotData(); ...@@ -75,11 +75,11 @@ $plots = $report->getPlotData();
$date = str_ireplace('FROM_UNIXTIME(', '',$date); $date = str_ireplace('FROM_UNIXTIME(', '',$date);
$date = str_ireplace(')', '',$date); $date = str_ireplace(')', '',$date);
$date = new DateTime('@'.$date); $date = new DateTime('@'.$date);
if ($thisstaff->getTimezone()) $date->setTimeZone(new DateTimeZone($cfg->getTimezone()));
$date->setTimeZone(new DateTimeZone($thisstaff->getTimezone())); $timezone = $date->format('e');
$range[] = $date->format('F j, Y'); $range[] = $date->format('F j, Y');
} }
echo __($range[0] . ' - ' . $range[1]); echo __($range[0] . ' - ' . $range[1] . ' (' . Format::timezone($timezone) . ')');
?> ?>
<ul class="clean tabs"> <ul class="clean tabs">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment