diff --git a/mythtv/programs/mythfilldatabase/xmltvparser.cpp b/mythtv/programs/mythfilldatabase/xmltvparser.cpp index 18430ade370..9b895359885 100644 --- a/mythtv/programs/mythfilldatabase/xmltvparser.cpp +++ b/mythtv/programs/mythfilldatabase/xmltvparser.cpp @@ -181,7 +181,11 @@ static void fromXMLTVDate(QString ×tr, QDateTime &dt) // While this seems like a hack, it's better than what was done before QString isoDateString = QString("%1 %2").arg(tmpDT.toString(Qt::ISODate)) .arg(tmp); - dt = QDateTime::fromString(isoDateString, Qt::ISODate).toUTC(); + // Work around Qt bug where zero offset dates are flagged as LocalTime + tmpDT = QDateTime::fromString(isoDateString, Qt::ISODate); + if (tmpDT.timeSpec() == Qt::LocalTime) + tmpDT.setTimeSpec(Qt::UTC); + dt = tmpDT.toUTC(); } if (!dt.isValid())