[freeside-commits] branch master updated. dd671563e488044645ab388468f7b2f82fb15fc4

Jeremy Davis jeremyd at 420.am
Mon Jun 30 14:07:31 PDT 2014


The branch, master has been updated
       via  dd671563e488044645ab388468f7b2f82fb15fc4 (commit)
      from  b93d0216d5bdaca2b5feb5a54f30a0aeab54f7fe (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 dd671563e488044645ab388468f7b2f82fb15fc4
Author: Jeremy Davis <jeremyd at freeside.biz>
Date:   Mon Jun 30 17:06:52 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