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:1 Changed 14 years ago by robertm

Resolution: invalid
Status: newclosed

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.

comment:2 in reply to:  1 Changed 14 years ago by anonymous

Resolution: invalid
Status: closednew

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 Changed 14 years ago by robertm

Status: newinfoneeded_new

Please feel free to explain the issue you are seeing, rather than proposing changes to code with no explanation.

comment:4 in reply to:  3 Changed 14 years ago by anonymous

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 robertm

Resolution: wontfix
Status: infoneeded_newclosed
Ticket locked: set

Closing until reporter can express an actual observed bug in MythTV.

Note: See TracTickets for help on using tickets.