summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/elements/cust_main_dayranges.html2
-rwxr-xr-xhttemplate/search/pay_batch.cgi4
-rw-r--r--httemplate/search/report_prepaid_income.cgi2
-rw-r--r--httemplate/search/sqlradius.cgi8
4 files changed, 8 insertions, 8 deletions
diff --git a/httemplate/search/elements/cust_main_dayranges.html b/httemplate/search/elements/cust_main_dayranges.html
index 9e4e86f9c..b3f1a2ef6 100644
--- a/httemplate/search/elements/cust_main_dayranges.html
+++ b/httemplate/search/elements/cust_main_dayranges.html
@@ -110,7 +110,7 @@ my $range_sub = delete($opt{'range_sub'}); #or die
my $offset = 0;
if($cgi->param('as_of')) {
- $offset = int((time - str2time($cgi->param('as_of'))) / 86400);
+ $offset = int((time - parse_datetime($cgi->param('as_of'))) / 86400);
$opt{'title'} .= ' ('.$cgi->param('as_of').')' if $offset > 0;
}
diff --git a/httemplate/search/pay_batch.cgi b/httemplate/search/pay_batch.cgi
index fb452870f..ebd323e13 100755
--- a/httemplate/search/pay_batch.cgi
+++ b/httemplate/search/pay_batch.cgi
@@ -97,12 +97,12 @@ my($begin, $end) = ( '', '' );
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";
}
diff --git a/httemplate/search/report_prepaid_income.cgi b/httemplate/search/report_prepaid_income.cgi
index c0e2b807e..bfb699b54 100644
--- a/httemplate/search/report_prepaid_income.cgi
+++ b/httemplate/search/report_prepaid_income.cgi
@@ -84,7 +84,7 @@ my $actual_label = $legacy ? 'Actual ' : '';
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;
diff --git a/httemplate/search/sqlradius.cgi b/httemplate/search/sqlradius.cgi
index 29f360298..cca121179 100644
--- a/httemplate/search/sqlradius.cgi
+++ b/httemplate/search/sqlradius.cgi
@@ -100,11 +100,11 @@ die "access denied"
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 @@ if ( $cgi->param('open_sessions') =~ /^(\d*)$/ ) {
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 = '';