projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service dependencies: part_pkg_restrict / part_pkg_restrict_soft, RT#33685
[freeside.git]
/
bin
/
aradial-sftp_and_import
diff --git
a/bin/aradial-sftp_and_import
b/bin/aradial-sftp_and_import
index
5335703
..
668ec49
100755
(executable)
--- a/
bin/aradial-sftp_and_import
+++ b/
bin/aradial-sftp_and_import
@@
-4,6
+4,7
@@
use strict;
use Getopt::Std;
use strict;
use Getopt::Std;
+use Date::Parse;
use Date::Format;
use Text::CSV_XS;
use DBI qw( :sql_types );
use Date::Format;
use Text::CSV_XS;
use DBI qw( :sql_types );
@@
-162,6
+163,8
@@
foreach my $filename ( @$ls ) {
#skip blank records
next unless grep defined($_), values %dbhash;
#skip blank records
next unless grep defined($_), values %dbhash;
+ my $date = time2str( '%Y-%m-%d %X', str2time( $hash{'Date'} ) );
+
$hash{'Status-Type'} = $status_type{ $hash{'Status-Type'} }
if exists $status_type{ $hash{'Status-Type'} };
$hash{'Status-Type'} = $status_type{ $hash{'Status-Type'} }
if exists $status_type{ $hash{'Status-Type'} };
@@
-170,7
+173,7
@@
foreach my $filename ( @$ls ) {
if ( $hash{'Status-Type'} eq 'Start' ) {
push @keys, 'AcctStartTime';
if ( $hash{'Status-Type'} eq 'Start' ) {
push @keys, 'AcctStartTime';
- $dbhash{'AcctStartTime'} = $
hash{'Date'}
;
+ $dbhash{'AcctStartTime'} = $
date
;
$sql = 'INSERT INTO radacct ( '. join(',', @keys).
' ) VALUES ( '. join(',', map ' ? ', @keys ). ' )';
$sql = 'INSERT INTO radacct ( '. join(',', @keys).
' ) VALUES ( '. join(',', map ' ? ', @keys ). ' )';
@@
-180,7
+183,7
@@
foreach my $filename ( @$ls ) {
my $AcctSessionId = delete($dbhash{AcctSessionId});
push @keys, 'AcctStopTime';
my $AcctSessionId = delete($dbhash{AcctSessionId});
push @keys, 'AcctStopTime';
- $dbhash{'AcctStopTime'} = $
hash{'Date'}
;
+ $dbhash{'AcctStopTime'} = $
date
;
push @extra_values, $AcctSessionId;
push @extra_values, $AcctSessionId;