[mythtvnz] Sky EPG after daylight saving

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Oct 1 08:45:39 BST 2018


I just had an interesting problem with my Sky EPG following the
daylight saving change.  I am using the Sky OpenTV EPG data via
tv_grab_dvb_plus, but I would think the same problem would happen no
matter how you were getting the OpenTV EPG.  The OpenTV EPG data seems
to handle the daylight saving change differently from the EIT EPG
data.  With the EIT data, if my memory is correct, Sky put the
daylight savings time in for all data after the change, and standard
time for all data before the change.  With the OpenTV EPG, it seems
they put standard time for all the data, including programmes that
would record after the change, and kept doing that until the change
happened.  Then they replaced all the EPG data with data that had
daylight savings times.  That meant that I had some programs record at
the wrong time until my daily EPG update happened at 15:10 on Sunday.
But even after that, when I looked at my Scheduled Recordings list, I
found that some programmes were in the schedule twice, once at the
standard time and once at the daylight saving time, and of course the
earlier (and wrong) time would have been the one recorded.  This seems
to have happened because they record at non-standard times.  One
example of this is "Can't Pay?  We'll Take It Away" that I record from
Prime HD on Sky.  It was scheduled for 20:40 and 21:40.  Since the new
data with daylight savings times had nothing that was scheduled for
20:40, the old standard time data at 20:40 never got overwritten and
was left in the database.  For programmes that record at the standard
times on the hour and half hour, they mostly did get overwritten.  To
fix this problem, I had to delete all my Sky EPG data from the
database, and re-run my EPG grabber script.

To delete only the Sky EPG data after the current time, this is the
SQL I used:

delete from program where (select sourceid from channel c where
c.chanid=program.chanid)>=4 and starttime > convert_tz('2018-10-01
20:29:00','NZ','UTC');

I have two Sky sources, with sourceid=4 and sourceid=6, which is why I
used the ">=4" in the command.  If you want to do this, you will need
to change that to match your Sky sourceid values or values, and also
set the time in the convert_tz function to a time a little in the
future.



More information about the mythtvnz mailing list