From 6897aea6913f9f8ab39803e8f8e06c1adefcd916 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 17 Mar 2013 19:11:33 -0700 Subject: fix report day selection on daylight savings boundaries, RT#21879 --- httemplate/search/pay_batch.cgi | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'httemplate') diff --git a/httemplate/search/pay_batch.cgi b/httemplate/search/pay_batch.cgi index 34e9fd7a2..00c6ba1b9 100755 --- a/httemplate/search/pay_batch.cgi +++ b/httemplate/search/pay_batch.cgi @@ -148,16 +148,10 @@ my $count_query = 'SELECT COUNT(*) FROM pay_batch'; my($begin, $end) = ( '', '' ); my @where; -if ( $cgi->param('beginning') - && $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/ ) { - $begin = parse_datetime($1); - push @where, "download >= $begin"; -} -if ( $cgi->param('ending') - && $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/ ) { - $end = parse_datetime($1) + 86399; - push @where, "download < $end"; -} + +my($beginning,$ending) = FS::UI::Web::parse_beginning_ending($cgi); +push @where, "download >= $beginning", + "download <= $ending"; my @status; if ( $cgi->param('open') ) { -- cgit v1.2.1