aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-08-10 18:17:27 +0100
committerStruan Donald <struan@exo.org.uk>2011-08-10 18:17:27 +0100
commit0a61c7decec68c2d61fecd0b5aa02e0ddfee2c35 (patch)
treed5fe7703ef03c9c7274c830bc82b115d727b6cac
parentf751e4d65ee79e8426ef6e7a11327de158d590a3 (diff)
add a day to the end date so we actually get the whole date range :(
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 141aa516d..405ee37ec 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -796,11 +796,13 @@ sub stats : Path('stats') : Args(0) {
$field = 'created' if $c->req->param('unconfirmed');
+ my $one_day = DateTime::Duration->new( days => 1 );
+
my $p = $c->model('DB::Problem')->search(
{
-AND => [
- $field => { '>=', $start_date->ymd },
- $field => { '<=', $end_date->ymd },
+ $field => { '>=', $start_date},
+ $field => { '<=', $end_date + $one_day },
],
},
{