[mythtv-users] Fwd: Re: channel4 hd has no eit - cross-eit

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Sep 5 10:36:20 UTC 2021

On Sun, 5 Sep 2021 11:21:40 +0100, you wrote:

>On Sun, 5 Sept 2021 at 09:23, John <jksjdevelop at gmail.com> wrote:
>> I too converted cross-eit to use Python 3 and it is currently working fine
>> for me.
>> I have to edit the file when the clocks change as the line
>> date = dateobj + datetime.timedelta(seconds=time.altzone)
>> doesn't cope with the time change, do you have a fix?
>While looking for errors, I just noticed the following line in my latest
>mythfilldatabase log:
>2021-09-05 11:10:35.405331 W  No explicit time zone found, guessing
>implicit UTC! Please consider enhancing the guide source to provide
>explicit UTC or local time instead.
>So perhaps a cleaner fix than the hack I suggested earlier might be to
>supply the time zone in the exported xml file. It will take a bit of
>digging around to figure out two things:
>1 - How / where / in what format
>2 - What the correct time zone should be. If I have to say UTC+0 in winter
>and UTC+1 in summer then I still need that IF statement. I am not aware of
>a way of saying "the time zone is whatever is current in the UK, so please
>go and look it up in some library that the OS surely has". Or perhaps
>that's what "local time" means, if I can figure out a way of saying that in
>the xml file.

The timezone data is added on each timestamp, so on each "start=" and
"stop=" in the XML file.  Here is an example from my New Zealand
FreeviewHD data today:

<programme channel="aljazeera.freeviewnz.tv" start="20210905000000
+1200" stop="20210905003000 +1200">
  <title>The Bottom Line</title>
  <desc>G Host Steve Clemons asks former CDC director Tom Frieden
about where humanity stands in the fight against coronavirus.</desc>
  <episode-num system="dd_progid">45899218</episode-num>
  <rating system="Freeview">

New Zealand is 12 hours ahead of UTC on standard time, and 13 hours
ahead on daylight saving time, so during daylight saving the "+1200"
changes to "+1300"  For the UK, I would suggest using "+0000" for
standard time and "+0100" for daylight saving time.  If that field is
present, at the changeover between standard and daylight saving time,
an XMLTV file may have timestamps that have overlapping times, but do
not actually overlap when the timezone setting is taken into account.

More information about the mythtv-users mailing list