use Date::Format 'time2str';
use Date::Parse 'str2time';
use Getopt::Long;
-use JSON;
+use Cpanel::JSON::XS;
use Net::HTTPS::Any qw(https_post);
use Time::Local;
'hashref' => { 'cdrbatch' => {op=>'like', value=>'portaone-import%'}},
'order_by' => 'ORDER BY _date DESC LIMIT 1',
});
- $startdate = time2str("%Y-%m-%d %H:%M:%S", $lastbatch->_date + 1) if $lastbatch;
+ $startdate = time2str("%Y-%m-%d %H:%M:%S", $lastbatch->_date) if $lastbatch;
}
$startdate ||= '2010-01-01 00:00:00'; #seems decently in the past