commit e70c300f7446ba6ec1259f459a0f0e1d2d592ed9
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Wed Feb 7 11:19:41 2024 +0100

    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.2m1t7xkt45...@jonas.vautherin.ch

 src/drv_imap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/drv_imap.c b/src/drv_imap.c
index ad95e3d..170e7fc 100644
--- a/src/drv_imap.c
+++ b/src/drv_imap.c
@@ -1031,7 +1031,7 @@ parse_date( const char *str )
        struct tm 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;
        if ((date = timegm( &datetime )) == -1)
                return -1;


_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to