From: Jaroslav Kysela Date: Mon, 10 Nov 2014 08:13:08 +0000 (+0100) Subject: xmltv: parser - dates and times without a explicit timezone are in UTC, fixes #2449 X-Git-Tag: v4.1~803 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c1f0fa1b6536cce4dc8abea334dacb0168ff0fa;p=thirdparty%2Ftvheadend.git xmltv: parser - dates and times without a explicit timezone are in UTC, fixes #2449 --- diff --git a/src/epggrab/module/xmltv.c b/src/epggrab/module/xmltv.c index 8b1836ba3..a697e5c48 100755 --- a/src/epggrab/module/xmltv.c +++ b/src/epggrab/module/xmltv.c @@ -80,9 +80,6 @@ static time_t _xmltv_str2time(const char *in) sscanf(str+sp+1, "%d", &tz); tz = (tz % 100) + (tz / 100) * 3600; // Convert from HHMM to seconds str[sp] = 0; - sp = 1; - } else { - sp = 0; } /* parse time */ @@ -96,10 +93,7 @@ static time_t _xmltv_str2time(const char *in) tm.tm_isdst = -1; if (r >= 5) { - if(sp) - return timegm(&tm) - tz; - else - return mktime(&tm); + return timegm(&tm) - tz; } else { return 0; }