[mythtv-commits] Ticket #9676: Obtaining program times across daylight savings time change gives inaccurate results

MythTV noreply at mythtv.org
Sun Mar 27 02:27:40 UTC 2011


#9676: Obtaining program times across daylight savings time change gives
inaccurate results
---------------------------------------+----------------------------
 Reporter:  mythtv@…                   |          Owner:  mdean
     Type:  Patch - Bug Fix            |         Status:  assigned
 Priority:  minor                      |      Milestone:  unknown
Component:  MythTV - Mythfilldatabase  |        Version:  0.24-fixes
 Severity:  medium                     |     Resolution:
 Keywords:                             |  Ticket locked:  0
---------------------------------------+----------------------------

Comment (by mythtv@…):

 I believe the final patch I attached solves the problem. I did some unit
 level testing, but it's hard to say 100% just because I can't force the
 guide data to span a daylight savings time change. I could only rig up
 some unit tests.

 To summarize
  * there were some calculations in the code that may have been written to
 an older, less complete QtDateTime API. They didn't handle daylight
 savings correctly.
  * EITHelper is written to calculate an offset from UTC in its
 constructor. It used that in its calculations rather than using
 QtDateTime's features. When EITHelper lives across a daylight savings
 change (which changes the offset from UTC) it starts calculating start
 times incorrectly, so it updates the schedule to be an hour off over time
 periods covered by the EIT.

 I think this patch solves the problems I've seen discussed in several
 places, like this thread: http://www.gossamer-
 threads.com/lists/mythtv/users/427478

 For myself, I happened to leave on vacation right before the time changed.
 Myth recorded shows off by an hour for more than a week. I cleared out the
 guide data and redownloaded it (without restarting myth) and it continued
 to be off by an hour. Restarting myth AND redownloading the data worked
 around the issue. This has happened to me on multiple previous time
 changes, and I know from those times that restarting myth only doesn't
 fully address the issue. In the thread above, the user's data being off
 for the next two days only would be consistent with about how long EIT
 data might exist for.


 Thanks, mdean, for looking at this patch. The time change thing has gotten
 me twice a year for years, so I finally decided the best thing to do was
 try and fix it myself. I hope I got it.

-- 
Ticket URL: <http://code.mythtv.org/trac/ticket/9676#comment:5>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center


More information about the mythtv-commits mailing list