]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
xmltv: parser - dates and times without a explicit timezone are in UTC, fixes #2449
authorJaroslav Kysela <perex@perex.cz>
Mon, 10 Nov 2014 08:13:08 +0000 (09:13 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 10 Nov 2014 08:13:13 +0000 (09:13 +0100)
src/epggrab/module/xmltv.c

index 8b1836ba3a1dcc9ac4619994f32079727903e513..a697e5c486d3c370e05227e2ba8434fe985ba6eb 100755 (executable)
@@ -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;
   }