fix xmltv time offsets

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
TangoCash
2018-10-28 13:06:12 +01:00
committed by Thilo Graf
parent 42b294bb6b
commit aff3629fdb
2 changed files with 13 additions and 5 deletions

View File

@@ -3262,11 +3262,11 @@ void CControlAPI::xmltvepgCGI(CyhookHandler *hh)
programmeTag = "programme ";
programmeTag += "channel=\""+string_printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, channel_id)+"\" ";
char zbuffer[25] = { 0 };
struct tm *mtime = localtime(&eventIterator->startTime);
struct tm *mtime = gmtime(&eventIterator->startTime);
strftime(zbuffer, 21, "%Y%m%d%H%M%S %z", mtime);
programmeTag += "start=\""+std::string(zbuffer)+"\" ";
long _stoptime = eventIterator->startTime + eventIterator->duration;
mtime = localtime(&_stoptime);
mtime = gmtime(&_stoptime);
strftime(zbuffer, 21, "%Y%m%d%H%M%S %z", mtime);
programmeTag += "stop=\""+std::string(zbuffer)+"\" ";