X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcdr%2Forcon.pm;h=7bdba93a6c817ab1504f213a14bef6d60ee2e1e6;hb=9479931dfcf854e6b783dc6b38c19a1875b18c2b;hp=4d15cfdf3b8e0344566d137a0a734cb8452c0e2c;hpb=43347717a28232010db936101e951bf9aaa9c62a;p=freeside.git diff --git a/FS/FS/cdr/orcon.pm b/FS/FS/cdr/orcon.pm index 4d15cfdf3..7bdba93a6 100644 --- a/FS/FS/cdr/orcon.pm +++ b/FS/FS/cdr/orcon.pm @@ -17,7 +17,16 @@ use FS::cdr; 'accountcode', #account number skip(2), #username #service id - 'calldate', #date + sub { my ($cdr, $calldate) = @_; + $cdr->set('calldate', $calldate); + + $calldate =~ /^(\d{4})\/(\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); + }, #date skip(1), #tariff region 'src', #originating number 'dst', #terminating number