diff --git a/include/class.report.php b/include/class.report.php index c39ec47cc5ea595aaddcaf46d25323929d58c1cc..12d7322d3dbc6665fed18b86d8b738d49eb091ba 100644 --- a/include/class.report.php +++ b/include/class.report.php @@ -153,6 +153,9 @@ class OverviewReport { 'annulled' => 0, ), )) + ->filter(array( + 'timestamp__range' => array($start, $stop, true), + )) ->aggregate(array( 'ServiceTime' => SqlAggregate::AVG(SqlFunction::timestampdiff( new SqlCode('HOUR'), new SqlField('thread__events__timestamp'), new SqlField('timestamp')) diff --git a/include/staff/dashboard.inc.php b/include/staff/dashboard.inc.php index 8bf11959560114bc18514d9d494aa3312e35d8d7..3c91e3c5fd9135cb550a2c39de52c4a0411445db 100644 --- a/include/staff/dashboard.inc.php +++ b/include/staff/dashboard.inc.php @@ -75,11 +75,11 @@ $plots = $report->getPlotData(); $date = str_ireplace('FROM_UNIXTIME(', '',$date); $date = str_ireplace(')', '',$date); $date = new DateTime('@'.$date); - if ($thisstaff->getTimezone()) - $date->setTimeZone(new DateTimeZone($thisstaff->getTimezone())); + $date->setTimeZone(new DateTimeZone($cfg->getTimezone())); + $timezone = $date->format('e'); $range[] = $date->format('F j, Y'); } - echo __($range[0] . ' - ' . $range[1]); + echo __($range[0] . ' - ' . $range[1] . ' (' . Format::timezone($timezone) . ')'); ?> <ul class="clean tabs">