Browse Source

permit leading whitespace in INTERNALDATE strings

the BNF specifies "(SP DIGIT) / 2DIGIT" for the date-day-fixed symbol,
but "*SP 1*DIGIT" matches that closely enough for parsing purposes.

REFMAIL: CYYDEEVZ8CCT.2M1T7XKT45HH8@jonas.vautherin.ch
master
Oswald Buddenhagen 9 months ago
parent
commit
e70c300f74
  1. 2
      src/drv_imap.c

2
src/drv_imap.c

@ -1031,7 +1031,7 @@ parse_date( const char *str )
struct tm datetime; struct tm datetime;
memset( &datetime, 0, sizeof(datetime) ); memset( &datetime, 0, sizeof(datetime) );
if (!(end = strptime( str, "%e-%b-%Y %H:%M:%S ", &datetime ))) if (!(end = strptime( str, " %e-%b-%Y %H:%M:%S ", &datetime )))
return -1; return -1;
if ((date = timegm( &datetime )) == -1) if ((date = timegm( &datetime )) == -1)
return -1; return -1;

Loading…
Cancel
Save