[mythtv-commits] Ticket #13010: Patch: Improve fromXMLTVDate processing for mythfilldatabase

MythTV noreply at mythtv.org
Tue Mar 7 00:52:09 UTC 2017


#13010: Patch: Improve fromXMLTVDate processing for mythfilldatabase
-------------------------------------------------+-------------------------
     Reporter:  Gary Buhrmaster                  |      Owner:  stuartm
  <gary.buhrmaster@…>                            |
         Type:  Patch - Bug Fix                  |     Status:  new
     Priority:  minor                            |  Milestone:  unknown
    Component:  MythTV - Mythfilldatabase        |    Version:  Master Head
     Severity:  medium                           |   Keywords:
Ticket locked:  0                                |
-------------------------------------------------+-------------------------
 Improve fromXMLTVDate processing for mythfilldatabase

 The mythfilldatabase xmltv datetime processing is interestingly challenged
 when converting some datetimes.  It will attempt to convert the provided
 initial part of the datetimes using QDateTime which uses the BE's local
 timezone.  If the local timezone has such things as daylight savings time,
 and invalid date/time combinations in the DST transition range are
 provided, the result in (many many) messages of the form:

 {{{
    CoreContext xmltvparser.cpp:168 (fromXMLTVDate) - Ignoring unknown
 timestamp format: 20170312020000
 }}}

 In the US (in those locations where DST are observed), there is no 2am on
 March 12th 2017 (the DST cut over time), as 2am magically turns into 3am,
 so the failed QDateTime conversion is correct, this is an invalid local
 datetime.  But the actual provided start is "20170312020000 +0000", but in
 the current code, the initial conversion is done in localtime.

 The included patch changes the date/time processing to avoid local
 timezone issues.  It will break up the xmltv datetimes into date part, the
 time part, and zone part, and convert separately, and combine and adjust
 at the end.


 * Note to the dev reviewing the patch:

 1. I believe stuartm was the last to attack the XMLTV date processing.
 Should someone other then he be the reviewer, touching base with stuartm
 might be appropriate.
 2. Unfortunately (for code review by a dev), git will create the patch
 matching on brackets and bare returns, so the patch can be a bit
 confusing.  I recommend just reviewing the resulting code.
 3. With QT5.2, the (mis)confusion that resulted in the needed patch for
 Mythtv ticket #11538 (adjusting for UTC from Localtime) has been addressed
 upstream.  Since MythTV now requires Qt 5.2, that code fragment fixup was
 eliminated in this revised code.
 {{{
 QT related info:
   Task-number: QTBUG-26161
   Task-number: QTBUG-29666
   Change-Id: If3cc7fc9778ca2b831644408ae749448d5975a3a
 }}}


 github ref:
 https://github.com/garybuhrmaster/mythtv/commit/7a3652ccad4a952b6579aba4545cb80375220499

 github git-am ref:
 https://github.com/garybuhrmaster/mythtv/commit/7a3652ccad4a952b6579aba4545cb80375220499.patch

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13010>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list