summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-07-23 11:05:59 -0700
committerMark Wells <mark@freeside.biz>2013-07-23 11:05:59 -0700
commitd24fa4ecb03899992e299638bf04345f6bec8e75 (patch)
tree24b87a54d77e7e2debd6a5db0df9f65990b32b9e
parent0778b67fa9c0b1de217d589bf4a717299c376a78 (diff)
minor fix, #23646
-rwxr-xr-xbin/cdr-voip_innovations.import6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/cdr-voip_innovations.import b/bin/cdr-voip_innovations.import
index 6219829a4..31a3e7cd6 100755
--- a/bin/cdr-voip_innovations.import
+++ b/bin/cdr-voip_innovations.import
@@ -9,6 +9,8 @@ use FS::UID qw(adminsuidsetup datasrc dbh);
use FS::cdr;
use FS::cdr_batch;
use FS::Record qw(qsearch qsearchs);
+use Date::Format 'time2str';
+use Date::Parse 'str2time';
###
@@ -66,13 +68,13 @@ if ( $opt_a ) {
if ( $opt_s ) {
# start date
# normalize date format
- $opt_s = str2time('%Y%m%d', time2str($opt_s)) if $opt_s =~ /\D/;
+ $opt_s = time2str('%Y%m%d', str2time($opt_s)) if $opt_s =~ /\D/;
warn "limiting to dates > $opt_s\n" if $opt_v;
@dirs = grep {$_ > $opt_s} @dirs;
}
if ( $opt_e ) {
# end date
- $opt_e = str2time('%Y%m%d', time2str($opt_e)) if $opt_e =~ /\D/;
+ $opt_e = time2str('%Y%m%d', str2time($opt_e)) if $opt_e =~ /\D/;
warn "limiting to dates < $opt_e\n" if $opt_v;
@dirs = grep {$_ < $opt_e} @dirs;
}