summaryrefslogtreecommitdiff
path: root/FS/FS/cdr.pm
diff options
context:
space:
mode:
authormark <mark>2010-09-22 19:35:18 +0000
committermark <mark>2010-09-22 19:35:18 +0000
commit343befcb41d5ab76173645ceb8ac235ca7b92d35 (patch)
treed353531d4dfdde28faceaedba00b971b05cd2feb /FS/FS/cdr.pm
parent5250c44bd7f282c7d782bf0e8349af12376929df (diff)
CIA and Infinite Conferencing cdr formats, RT#8788
Diffstat (limited to 'FS/FS/cdr.pm')
-rw-r--r--FS/FS/cdr.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/cdr.pm b/FS/FS/cdr.pm
index e8be080..cc25a17 100644
--- a/FS/FS/cdr.pm
+++ b/FS/FS/cdr.pm
@@ -768,8 +768,11 @@ sub _cdr_date_parse {
if ( $date =~ /^\s*(\d{4})\D(\d{1,2})\D(\d{1,2})\D+(\d{1,2})\D(\d{1,2})\D(\d{1,2})(\D|$)/ ) {
($year, $mon, $day, $hour, $min, $sec) = ( $1, $2, $3, $4, $5, $6 );
- } elsif ( $date =~ /^\s*(\d{1,2})\D(\d{1,2})\D(\d{4})\s+(\d{1,2})\D(\d{1,2})\D(\d{1,2})(\D|$)/ ) {
+ } elsif ( $date =~ /^\s*(\d{1,2})\D(\d{1,2})\D(\d{4})\s+(\d{1,2})\D(\d{1,2})(?:\D(\d{1,2}))?(\D|$)/ ) {
+ # 8/26/2010 12:20:01
+ # optionally without seconds
($mon, $day, $year, $hour, $min, $sec) = ( $1, $2, $3, $4, $5, $6 );
+ $sec = 0 if !defined($sec);
} elsif ( $date =~ /^\s*(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d+\.\d+)(\D|$)/ ) {
# broadsoft: 20081223201938.314
($year, $mon, $day, $hour, $min, $sec) = ( $1, $2, $3, $4, $5, $6 );