[freeside-commits] freeside/httemplate/search sqlradius.cgi, 1.19, 1.19.4.1 report_prepaid_income.cgi, 1.12.2.1, 1.12.2.2 pay_batch.cgi, 1.4, 1.4.4.1
Ivan,,,
ivan at wavetail.420.am
Fri Apr 9 01:18:38 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv7411/httemplate/search
Modified Files:
Tag: FREESIDE_1_9_BRANCH
sqlradius.cgi report_prepaid_income.cgi pay_batch.cgi
Log Message:
fix date parsing when using international dates (package date edit), RT#8027
Index: sqlradius.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/sqlradius.cgi,v
retrieving revision 1.19
retrieving revision 1.19.4.1
diff -u -w -d -r1.19 -r1.19.4.1
--- sqlradius.cgi 22 Oct 2008 04:39:54 -0000 1.19
+++ sqlradius.cgi 9 Apr 2010 08:18:36 -0000 1.19.4.1
@@ -100,11 +100,11 @@
my( $beginning, $ending ) = ( '', '' );
if ( $cgi->param('stoptime_beginning')
&& $cgi->param('stoptime_beginning') =~ /^([ 0-9\-\/\:\w]{0,54})$/ ) {
- $beginning = str2time($1);
+ $beginning = parse_datetime($1);
}
if ( $cgi->param('stoptime_ending')
&& $cgi->param('stoptime_ending') =~ /^([ 0-9\-\/\:\w]{0,54})$/ ) {
- $ending = str2time($1); # + 86399;
+ $ending = parse_datetime($1); # + 86399;
}
if ( $cgi->param('begin') && $cgi->param('begin') =~ /^(\d+)$/ ) {
$beginning = $1;
@@ -121,11 +121,11 @@
my( $starttime_beginning, $starttime_ending ) = ( '', '' );
if ( $cgi->param('starttime_beginning')
&& $cgi->param('starttime_beginning') =~ /^([ 0-9\-\/\:\w]{0,54})$/ ) {
- $starttime_beginning = str2time($1);
+ $starttime_beginning = parse_datetime($1);
}
if ( $cgi->param('starttime_ending')
&& $cgi->param('starttime_ending') =~ /^([ 0-9\-\/\:\w]{0,54})$/ ) {
- $starttime_ending = str2time($1); # + 86399;
+ $starttime_ending = parse_datetime($1); # + 86399;
}
my $cgi_svc_acct = '';
Index: report_prepaid_income.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/report_prepaid_income.cgi,v
retrieving revision 1.12.2.1
retrieving revision 1.12.2.2
diff -u -w -d -r1.12.2.1 -r1.12.2.2
--- report_prepaid_income.cgi 24 Mar 2010 08:38:01 -0000 1.12.2.1
+++ report_prepaid_income.cgi 9 Apr 2010 08:18:36 -0000 1.12.2.2
@@ -84,7 +84,7 @@
my $time = time;
-my $now = $cgi->param('date') && str2time($cgi->param('date')) || $time;
+my $now = $cgi->param('date') && parse_datetime($cgi->param('date')) || $time;
$now =~ /^(\d+)$/ or die "unparsable date?";
$now = $1;
Index: pay_batch.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/pay_batch.cgi,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -u -w -d -r1.4 -r1.4.4.1
--- pay_batch.cgi 5 Oct 2008 21:36:50 -0000 1.4
+++ pay_batch.cgi 9 Apr 2010 08:18:36 -0000 1.4.4.1
@@ -97,12 +97,12 @@
my @where;
if ( $cgi->param('beginning')
&& $cgi->param('beginning') =~ /^([ 0-9\-\/]{0,10})$/ ) {
- $begin = str2time($1);
+ $begin = parse_datetime($1);
push @where, "download >= $begin";
}
if ( $cgi->param('ending')
&& $cgi->param('ending') =~ /^([ 0-9\-\/]{0,10})$/ ) {
- $end = str2time($1) + 86399;
+ $end = parse_datetime($1) + 86399;
push @where, "download < $end";
}
More information about the freeside-commits
mailing list