[freeside-commits] branch FREESIDE_3_BRANCH updated. 7fbe3ae31ecee80d14c510e779ca9b2618ba2dff

Jeremy Davis jeremyd at 420.am
Mon Jun 30 14:08:09 PDT 2014


The branch, FREESIDE_3_BRANCH has been updated
       via  7fbe3ae31ecee80d14c510e779ca9b2618ba2dff (commit)
      from  71e5c03982da683dfafff0a4d7c295d3c1e342ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7fbe3ae31ecee80d14c510e779ca9b2618ba2dff
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Mon Jun 30 17:08:03 2014 -0400

    29050 Fix dates

diff --git a/FS/FS/cdr/orcon.pm b/FS/FS/cdr/orcon.pm
index 4d15cfd..51ef9ea 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{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

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cdr/orcon.pm |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list