-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hi,
I use maildir2mbox in a cron job that picks up a 'safety' maildir folder and turns it into an mbox that I can logrotate.
Every now and then I get email where the date is set in a strange way. In this case I think the triggering string was 'Sun, 10 Jun 2018 25:19:56 +0200'
This throws an error like:
Validation failed for type named Hour declared in
package DateTime::Types (/usr/lib/x86_64-linux-gnu/perl5/5.26/DateTime/Types.pm) at line 101 in sub named (eval) with value 25
Trace begun at Specio::Exception->new line 57
Specio::Exception::throw('Specio::Exception', 'message', 'Validation failed for type named Hour declared in package
DateTime::Types (/usr/lib/x86_64-linux-gnu/perl5/5.26/DateTime/Types.pm) at line 101 in sub named (eval) with value 25',
'type', 'Specio::Constraint::Simple=HASH(0x55d8d2b40a48)', 'value', 25) called at (eval 200) line 144
DateTime::_check_new_params('day', 10, 'time_zone', '+0200', 'year', 2018, 'second', 56, 'month', 6, 'minute', 19, 'hour', 25)
called at /usr/lib/x86_64-linux-gnu/perl5/5.26/DateTime.pm line 176
DateTime::new('DateTime', 'day', 10, 'time_zone', '+0200', 'year', 2018, 'second', 56, 'month', 6, 'minute', 19, 'hour', 25)
called at /usr/share/perl5/DateTime/Format/Mail.pm line 215
DateTime::Format::Mail::parse_datetime('DateTime::Format::Mail=HASH(0x55d8d1e181e0)', 'Sun, 10 Jun 2018 25:19:56 +0200')
called at /home/adam/bin/dateRfc3339ToMbox.pl line 15