From 0a61c7decec68c2d61fecd0b5aa02e0ddfee2c35 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Wed, 10 Aug 2011 18:17:27 +0100 Subject: add a day to the end date so we actually get the whole date range :( --- perllib/FixMyStreet/App/Controller/Admin.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm') 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 }, ], }, { -- cgit v1.2.3