summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-09-22 00:32:14 +0000
committerivan <ivan>2011-09-22 00:32:14 +0000
commit0cf20debd248e9d4d805ed0e8ab3580123fae622 (patch)
treec5e93ab29295d1055f4ab96cd2db245df2ffd619
parentad459f213306f06bec36841e2aca8631692e6b55 (diff)
add datestamp to batch name derived from filename, remove temp files for all errors that abort processing, RT#14385
-rwxr-xr-xFS/bin/freeside-cdr-sftp_and_import4
1 files changed, 2 insertions, 2 deletions
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;