Commit a437ac39 a437ac395dccd5ccd0adfc5376b5e3a1a05f7365 by Sergey Poznyakoff

(parse822_time): Tolerate unknown timezone abbreviations.

1 parent 4ec65fa5
...@@ -1606,16 +1606,16 @@ parse822_time (const char **p, const char *e, ...@@ -1606,16 +1606,16 @@ parse822_time (const char **p, const char *e,
1606 break; 1606 break;
1607 } 1607 }
1608 1608
1609 if (strspn (zp, "0123456789") != 4) 1609 if (strspn (zp, "0123456789") == 4)
1610 { 1610 {
1611 *p = save;
1612 str_free (&zone);
1613 return EPARSE;
1614 }
1615 /* convert to seconds from UTC */ 1611 /* convert to seconds from UTC */
1616 hh = (zone[1] - '0') * 10 + (zone[2] - '0'); 1612 hh = (zone[1] - '0') * 10 + (zone[2] - '0');
1617 mm = (zone[3] - '0') * 10 + (zone[4] - '0'); 1613 mm = (zone[3] - '0') * 10 + (zone[4] - '0');
1618 1614 }
1615 else
1616 {
1617 hh = mm = 0; /* Consider equivalent to -0000 */
1618 }
1619 if (tz) 1619 if (tz)
1620 *tz = sign * (hh * 60 * 60 + mm * 60); 1620 *tz = sign * (hh * 60 * 60 + mm * 60);
1621 } 1621 }
......