summaryrefslogtreecommitdiff
path: root/FS/FS/UI
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-03-17 19:11:33 -0700
committerIvan Kohler <ivan@freeside.biz>2013-03-17 19:11:33 -0700
commit6897aea6913f9f8ab39803e8f8e06c1adefcd916 (patch)
tree73c974e0e5ac08b44ddce516f9577758a7198079 /FS/FS/UI
parent05a8005cb5435fbdb3552af855a77934b58eac91 (diff)
fix report day selection on daylight savings boundaries, RT#21879
Diffstat (limited to 'FS/FS/UI')
-rw-r--r--FS/FS/UI/Web.pm9
1 files changed, 2 insertions, 7 deletions
diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm
index d31bbf0..2e6d482 100644
--- a/FS/FS/UI/Web.pm
+++ b/FS/FS/UI/Web.pm
@@ -6,7 +6,7 @@ use Exporter;
use Carp qw( confess );
use HTML::Entities;
use FS::Conf;
-use FS::Misc::DateTime qw( parse_datetime );
+use FS::Misc::DateTime qw( parse_datetime day_end );
use FS::Record qw(dbdef);
use FS::cust_main; # are sql_balance and sql_date_balance in the right module?
@@ -40,12 +40,7 @@ sub parse_beginning_ending {
if ( $cgi->param($prefix.'end') =~ /^(\d+)$/ ) {
$ending = $1 - 1;
} elsif ( $cgi->param($prefix.'ending') =~ /^([ 0-9\-\/\:]{1,64})$/ ) {
- #probably need an option to turn off the + 86399
-
- #no, this should be add one day minus one second...
- # 86399 is wrong twice a year when daylight savings time changes
- # and leap seconds too but only a second rather than an hour..
- $ending = parse_datetime($1) + 86399;
+ $ending = day_end( parse_datetime($1) );
}
( $beginning, $ending );