Opened 14 years ago
Closed 14 years ago
#8722 closed patch (wontfix)
xmltvparser uses incorrect date format for "previously-shown"
Reported by: | anonymous | Owned by: | stuartm |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | MythTV - Mythfilldatabase | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | yes |
Description
xmltvparser.cpp currently has:
411 else if (info.tagName() == "previously-shown") 412 { 413 pginfo->previouslyshown = true; 414 415 QString prevdate = info.attribute("start"); 416 pginfo->originalairdate = 417 QDate::fromString(prevdate, Qt::ISODate); 418 }
However, the date format for previously-shown given at the xmltv wiki ( http://wiki.xmltv.org/index.php/XMLTVFormat ) seems to imply that the string is not in ISODate format but rather XMLTVDate (yyyymmddtttttt) format. Propose changing code to:
411 else if (info.tagName() == "previously-shown") 412 { 413 pginfo->previouslyshown = true; 414 415 QString prevdate = info.attribute("start"); 415 QDateTime originalairdatetime; 415 fromXMLTVDate(prevdate,originalairdatetime); 416 pginfo->originalairdate = 417 originalairdatetime.date(); 418 }
Change History (5)
comment:2 Changed 14 years ago by
Resolution: | invalid |
---|---|
Status: | closed → new |
Replying to robertm:
Actually, XML TV date format *is* ISO 8601 Date.
http://xmltv.cvs.sourceforge.net/viewvc/xmltv/xmltv/xmltv.dtd
If there is a specific issue you are having, please bring it up on the user or dev list.
Did you actually read the DTD that you linked? It says:
All dates and times in this DTD follow the same format, loosely based on ISO 8601. They can be 'YYYYMMDDhhmmss' or some initial substring
Note the word "loosely". Qt::ISODate says:
ISO 8601 extended format: either YYYY-MM-DD for dates or YYYY-MM-DDTHH:MM:SS for combined dates and times.
http://doc.trolltech.com/4.6/qt.html#DateFormat-enum
XMLTV's date format is not ISO 8601. The two simply are not compatible.
comment:3 follow-up: 4 Changed 14 years ago by
Status: | new → infoneeded_new |
---|
Please feel free to explain the issue you are seeing, rather than proposing changes to code with no explanation.
comment:4 Changed 14 years ago by
Replying to robertm:
Please feel free to explain the issue you are seeing, rather than proposing changes to code with no explanation.
ISO 8601 requires the 'T' character to separate the date and time. XMLTV DTD does not. Therefore, XMLTV date format is not ISO 8601. Using ISO 8601 to interpret XMLTV dates is incorrect behavior.
comment:5 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | infoneeded_new → closed |
Ticket locked: | set |
Closing until reporter can express an actual observed bug in MythTV.
Actually, XML TV date format *is* ISO 8601 Date.
http://xmltv.cvs.sourceforge.net/viewvc/xmltv/xmltv/xmltv.dtd
If there is a specific issue you are having, please bring it up on the user or dev list.