From: Ivan Kohler Date: Tue, 19 Mar 2013 22:42:39 +0000 (-0700) Subject: fix report day selection on daylight savings boundaries, RT#21879 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=be49cf6b227c698d16238d1be6c9c7785fa5870d;p=freeside.git fix report day selection on daylight savings boundaries, RT#21879 --- diff --git a/FS/FS/Misc/DateTime.pm b/FS/FS/Misc/DateTime.pm index 99ff409e6..2fff90647 100644 --- a/FS/FS/Misc/DateTime.pm +++ b/FS/FS/Misc/DateTime.pm @@ -2,8 +2,8 @@ package FS::Misc::DateTime; use base qw( Exporter ); use vars qw( @EXPORT_OK ); -use POSIX; use Carp; +use Time::Local; use Date::Parse; use DateTime::Format::Natural; use FS::Conf; @@ -49,7 +49,7 @@ sub parse_datetime { #carp "WARNING: can't parse date: ". $parser->error; #return ''; #huh, very common, we still need the "partially" (fully enough for our purposes) parsed date. - $dt->epoch; + return $dt->epoch; } } else { return str2time($string, $tz); @@ -69,7 +69,7 @@ sub day_end { my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time); - mktime(59,59,23,$mday,$mon,$year,$wday,$yday,$isdst); + timelocal(59,59,23,$mday,$mon,$year); } =back