Closed maxbambi closed 8 years ago
I have the same problem. I am in Australia, so our timezone is UTC+10. The EPG data is provided by an online service, so we can not modify it easily.
As an example:
<programme start="20160810193000 +0000" stop="20160810200000 +0000" channel="Seven">
<title>Sunrise</title>
According to https://www.xmltvlistings.com/help/api/xmltv, the format is as follows:
<programme start="{Start Time} {Timezone Offset}" stop="{End Time} {Timezone Offset}" channel="{Station ID}">
My Linux box is set to AEST, which is UTC+10. The plugin should be able to check the local timezone and adjust the time received in the xml appropriately.
In this case, the EPG shows the program 'Sunrise' to start at 7:30pm, when in fact it starts at 5:30am. The data provided in the XML is correct (7:30pm UTC is 5:30am AEST), but the EPG displays the wrong information.
NOTE: This can be manually fixed using the EPG time offset in the settings, but will have to be manually adjusted at the winter/summer time change.
@markcs how do I adjust using the offset? My xmltv feed is in EST and I'm in PST.
The guide works fine except it shows for EST. I need to offset it by 3 hours but I tried -7,-3,+3,+7 in the addon settings, but then nothing shows.
It works fine except everything is off by 3 hours if I leave the offset disabled.
Here's a sample start/stop time in the xml: start="20160913233020 -0400" stop="20160914030020 -0400"
.
The m3u file does not use tvg-shift
. Whenever I tried using different values (+/-3,4,7) I lost the guide schedule.
How do I make the guide show correctly for PST which is -0700
?
Fixed by #89
The code in function
ParseDateTime
seems not to consider time zones in EPG, as in<program start="20160727005000 +0200" etc..
` int PVRIptvData::ParseDateTime(std::string& strDate, bool iDateFormat) { struct tm timeinfo; memset(&timeinfo, 0, sizeof(tm));
if (iDateFormat) sscanf(strDate.c_str(), "%04d%02d%02d%02d%02d%02d", &timeinfo.tm_year, &timeinfo.tm_mon, &timeinfo.tm_mday, &timeinfo.tm_hour, &timeinfo.tm_min, &timeinfo.tm_sec); else sscanf(strDate.c_str(), "%02d.%02d.%04d%02d:%02d:%02d", &timeinfo.tm_mday, &timeinfo.tm_mon, &timeinfo.tm_year, &timeinfo.tm_hour, &timeinfo.tm_min, &timeinfo.tm_sec);
timeinfo.tm_mon -= 1; timeinfo.tm_year -= 1900; timeinfo.tm_isdst = -1;
return mktime(&timeinfo); } `
I suggest to convert all times to UTC with a little algebric operation and then user can adjust ALL EPG times in user's interface with a single timeshift according to his time zone.