From d8bd6fb019cfd17f80bac30f0e313d4e944969ae Mon Sep 17 00:00:00 2001 From: dhead666 Date: Tue, 1 Sep 2015 17:15:16 +0300 Subject: [PATCH] xmltv: handle timezone attached to time with no space padding --- src/epggrab/module/xmltv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c index 00f558156..886c1bb8d 100644 --- a/src/epggrab/module/xmltv.c +++ b/src/epggrab/module/xmltv.c @@ -72,13 +72,15 @@ static time_t _xmltv_str2time(const char *in) str[sizeof(str)-1] = '\0'; /* split tz */ - while (str[sp] && str[sp] != ' ') + while (str[sp] && str[sp] != ' ' && str[sp] != '+' && str[sp] != '-') + sp++; + if (str[sp] == ' ') sp++; /* parse tz */ // TODO: handle string TZ? if (str[sp]) { - sscanf(str+sp+1, "%d", &tz); + sscanf(str+sp, "%d", &tz); tz = (tz % 100) + (tz / 100) * 3600; // Convert from HHMM to seconds str[sp] = 0; } -- 2.47.3