summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-07-23 11:05:50 -0700
committerMark Wells <mark@freeside.biz>2013-07-23 11:05:50 -0700
commitd2b79b490c5a685991ca87ec6f953a7d18782c1d (patch)
tree75c00dfc708d6e5d5a9befe7027f55c6c5285688
parent233dcab1ee337c6ab35abde5c3f22d57b40eb82c (diff)
minor fix, #23646
-rwxr-xr-x[-rw-r--r--]bin/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 100644..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;
}