From: ivan Date: Thu, 22 Sep 2011 00:32:14 +0000 (+0000) Subject: add datestamp to batch name derived from filename, remove temp files for all errors... X-Git-Tag: freeside_2_3_1~283 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=0cf20debd248e9d4d805ed0e8ab3580123fae622 add datestamp to batch name derived from filename, remove temp files for all errors that abort processing, RT#14385 --- diff --git a/FS/bin/freeside-cdr-sftp_and_import b/FS/bin/freeside-cdr-sftp_and_import index 48b6f697f..039941c72 100755 --- a/FS/bin/freeside-cdr-sftp_and_import +++ b/FS/bin/freeside-cdr-sftp_and_import @@ -2,7 +2,7 @@ use strict; use Getopt::Std; -use Date::Format qw(str2time); +use Date::Format; use Net::SFTP::Foreign::Compat; use Net::FTP; use FS::UID qw(adminsuidsetup datasrc); @@ -108,7 +108,7 @@ foreach my $filename ( @$ls ) { my $import_options = { 'file' => "$cachedir/$ungziped", 'format' => $format, - 'batch_namevalue' => $filename.'-'.str2time('%Y-%m-%d'), + 'batch_namevalue' => $filename.'-'.time2str('%Y-%m-%d', time), 'empty_ok' => 1, }; $import_options->{'cdrtypenum'} = $opt_c if $opt_c;