[mythtv-users] Bring forward XMLTV times
Josu Lazkano
josu.lazkano at gmail.com
Thu May 24 15:01:39 UTC 2012
2012/5/24 Karl Dietz <dekarl at spaetfruehstuecken.org>
> On 23.05.2012 22:17, Josu Lazkano wrote:
>
>> Thanks both, I have 3 different sources and this the only one with
>> different times. So I can not fix my local time, I will delay the other
>> XMLTV sources.
>>
>
> Hi Josu,
>
> what we are getting at is that all xmltv source *must* be explicit
> about their time zone. e.g. timestamps *must* looks like
> 201205240730 +0200 (now in Germany) or 201205240630 +0100 (now in UK)
>
> Looking at my notes http://wiki.xmltv.org/index.**
> php/User:Dekarl#Potential_**Data_Sources<http://wiki.xmltv.org/index.php/User:Dekarl#Potential_Data_Sources>I see that Phazer was broken in that
> regard when I last looked at their data.
>
> MythTV will then do the right thing if you set your XMLTV timezone
> setting to "auto". There is no need to change any files. (if that does
> not work its a bug and should be fixed :)
>
> My suggestion is to write a grabber for Phazer that know the local time
> zone for each channel and fixes their guide (or even better fix it at
> generation)
>
>
> My other sources has same timezone. I use to execute nightly with cron.
>>
>
> PS: did you look at tv_grab_uk_rt for the BBC channels? They provide
> correct times.
>
> Regards,
> Karl
>
>
> Thanks all, I get this python script:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re, sys
if len(sys.argv)==2:
with open(sys.argv[1]) as file:
txt=file.read()
fechas=re.findall(r"[0-9]{14}",txt)
for fecha in fechas:
numero=str(int(fecha[8:10])-1 % 24).zfill(2)
actualizada=fecha[:8]+numero+fecha[10:]
txt=txt.replace(fecha, actualizada)
with open(sys.argv[1], "w") as file:
file.write(txt)
else:
print "Usage: python change_hour.py file"
Best regards.
--
Josu Lazkano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20120524/9c5c187a/attachment.html>
More information about the mythtv-users
mailing list