projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f9ff81b
)
29398 Add start date to zintel
author
Jeremy Davis
<jeremyd@freeside.biz>
Tue, 3 Jun 2014 18:04:00 +0000
(14:04 -0400)
committer
Jeremy Davis
<jeremyd@freeside.biz>
Tue, 3 Jun 2014 18:04:00 +0000
(14:04 -0400)
FS/FS/cdr/zintel.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cdr/zintel.pm
b/FS/FS/cdr/zintel.pm
index
7d78d11
..
1d2236c
100644
(file)
--- 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 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);
@ISA = qw(FS::cdr);
@@
-16,7
+17,17
@@
use FS::cdr qw(_cdr_date_parser_maker);
'accountcode', #customer
'src', #anumber
'dst', #bnumber
'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
'billsec', #duration
skip(3), #calltype
#status