It was getting through a lot of emails before the error, it's not the first message.
I replaced a spammer domain with example.com
Here is the end of the debug output:
<< * 13786 FETCH (UID 13786 FLAGS () INTERNALDATE "21-Feb-2014 13:11:38 +0000" BODY[HEADER.FIELDS (FROM DATE)] {116}
<< Date: Fri, 21 Feb 2014 13:00:31 +0000 (GMT)
<< From: Home Media Magazine <HomeMediaDaily@example.com>
<<
<< )
<< 1 OK Fetch completed.
badly formatted date in message: , 23 Dec 2007 22:42:15 +0800
calculated replacement date as: Sun Dec 23 22:42:15 2007
badly formatted date in message: , 23 Dec 2007 18:53:15 +0200
calculated replacement date as: Sun Dec 23 18:53:15 2007
The 'hour' parameter (undef) to DateTime::new was an 'undef', which is not one of the allowed types: scalar
at /usr/lib64/perl5/vendor_perl/DateTime.pm line 176
DateTime::new(undef, 'second', 0, 'minute', undef, 'hour', undef, 'day', undef, ...) called at /usr/local/imap-tools/IMAPtoMbox.pl line 618
main::getMsgList('INBOX', 'ARRAY(0x1aee5d0)', 'IO::Socket::INET=GLOB(0x2166678)') called at /usr/local/imap-tools/IMAPtoMbox.pl line 57