Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
xmltv: handle timezone attached to time with no space padding
  • Loading branch information
dhead666 authored and perexg committed Sep 2, 2015
1 parent d989da1 commit 9ffc7c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/epggrab/module/xmltv.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9ffc7c1

Please sign in to comment.