From: Mark Wells Date: Tue, 23 Jul 2013 18:05:59 +0000 (-0700) Subject: minor fix, #23646 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=d24fa4ecb03899992e299638bf04345f6bec8e75 minor fix, #23646 --- 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; }