Correct handling of RFC3339 format with second fraction.
authorAndrej Kacian <ticho@claws-mail.org>
Mon, 27 Jul 2015 11:12:59 +0000 (13:12 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Mon, 27 Jul 2015 23:11:41 +0000 (01:11 +0200)
Patch by Darko Koruga.

src/procheader.c

index e5a5416..98ecc0c 100644 (file)
@@ -841,7 +841,7 @@ static gint procheader_scan_date_string(const gchar *str,
        *weekday = '\0';
 
        /* RFC3339 subset, with fraction of second */
-       result = sscanf(str, "%4d-%2d-%2d%c%2d:%2d:%2d.%1d%6s",
+       result = sscanf(str, "%4d-%2d-%2d%c%2d:%2d:%2d.%d%6s",
                        year, &month_n, day, &sep1, hh, mm, ss, &secfract, zonestr);
        debug_print("str |%s|, result %d\n", str, result);
        if (result == 9