[freeside-commits] freeside/FS/FS/UI Web.pm,1.43,1.44
Ivan,,,
ivan at wavetail.420.am
Fri Apr 9 01:18:26 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/UI
In directory wavetail.420.am:/tmp/cvs-serv7332/FS/FS/UI
Modified Files:
Web.pm
Log Message:
fix date parsing when using international dates (package date edit), RT#8027
Index: Web.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UI/Web.pm,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -w -d -r1.43 -r1.44
--- Web.pm 1 Apr 2010 04:43:54 -0000 1.43
+++ Web.pm 9 Apr 2010 08:18:24 -0000 1.44
@@ -4,6 +4,7 @@
use vars qw($DEBUG @ISA @EXPORT_OK $me);
use Exporter;
use FS::Conf;
+use FS::Misc::DateTime qw( parse_datetime );
use FS::Record qw(dbdef);
use FS::cust_main; # are sql_balance and sql_date_balance in the right module?
@@ -30,7 +31,7 @@
if ( $cgi->param($prefix.'begin') =~ /^(\d+)$/ ) {
$beginning = $1;
} elsif ( $cgi->param($prefix.'beginning') =~ /^([ 0-9\-\/]{1,64})$/ ) {
- $beginning = str2time($1) || 0;
+ $beginning = parse_datetime($1) || 0;
}
my $ending = 4294967295; #2^32-1
@@ -38,7 +39,7 @@
$ending = $1 - 1;
} elsif ( $cgi->param($prefix.'ending') =~ /^([ 0-9\-\/]{1,64})$/ ) {
#probably need an option to turn off the + 86399
- $ending = str2time($1) + 86399;
+ $ending = parse_datetime($1) + 86399;
}
( $beginning, $ending );
More information about the freeside-commits
mailing list