diff options
Diffstat (limited to 'FS/FS')
-rw-r--r-- | FS/FS/cdr/zintel.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/FS/FS/cdr/zintel.pm b/FS/FS/cdr/zintel.pm index 7d78d1153..1d2236c38 100644 --- a/FS/FS/cdr/zintel.pm +++ b/FS/FS/cdr/zintel.pm @@ -4,6 +4,7 @@ use strict; use vars qw( @ISA %info $tmp_mon $tmp_mday $tmp_year ); use Time::Local; use FS::cdr qw(_cdr_date_parser_maker); +use Date::Parse; @ISA = qw(FS::cdr); @@ -16,7 +17,17 @@ use FS::cdr qw(_cdr_date_parser_maker); 'accountcode', #customer 'src', #anumber 'dst', #bnumber - 'calldate', #datetime + sub { my ($cdr, $calldate) = @_; + $cdr->set('calldate', $calldate); + + $calldate =~ /^(\d{2})\/(\d{2})\/(\d{4})\s*(\d{2}):(\d{2}):(\d{2})$/ + or die "unparseable date: $calldate"; + my $tmp_date = "$2/$1/$3 $4:$5:$6"; + + $tmp_date = str2time($tmp_date); + $cdr->set('startdate', $tmp_date); + + }, #DateTime 'billsec', #duration skip(3), #calltype #status |