projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b93d021
)
29050 Fix dates
author
Jeremy Davis
<jeremyd@freeside.biz>
Mon, 30 Jun 2014 21:06:52 +0000
(17:06 -0400)
committer
Jeremy Davis
<jeremyd@freeside.biz>
Mon, 30 Jun 2014 21:06:52 +0000
(17:06 -0400)
FS/FS/cdr/orcon.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cdr/orcon.pm
b/FS/FS/cdr/orcon.pm
index
4d15cfd
..
51ef9ea
100644
(file)
--- 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
'accountcode', #account number
skip(2), #username
#service id
- 'calldate', #date
+ 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);
+ }, #date
skip(1), #tariff region
'src', #originating number
'dst', #terminating number
skip(1), #tariff region
'src', #originating number
'dst', #terminating number