X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcdr%2Fzintel.pm;h=1d2236c386bbd288c3d8a6b6a6024b816452b470;hb=08db5f6900bb754efb597a2967adde4dbd12e731;hp=7d78d1153b6fe5b1b48e970a051a3ea6ddb962dd;hpb=8745f4dd18eae385ba414aa82e69d61aa0a1047d;p=freeside.git 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