Jose wrote:
> I sent this patch on XMLTV some time ago, but I didn't get any response
> on this!

Sorry, the patch was on my to-check-list and I had forgotten it.

My problem is that it looks like a completly different xmltv file
format:

|     try:
| -       secs = time.mktime(time.strptime(timestr,'%Y-%m-%d %H:%M:%S'))
| +       secs = time.mktime(time.strptime(timestr,'%Y%m%d%H%M%S %Z'))
|     except ValueError:
| -       timestr = timestr.replace('EST', '')
| -       secs = time.mktime(time.strptime(timestr,'%Y-%m-%d %H:%M:%S'))
| +       #try without the timezone
| +       secs = time.mktime(time.strptime(tval,'%Y%m%d%H%M%S'))

You not only fix (or don't fix, I had not tested it) the timezone
stuff, you also change the way times are encoded.

Looking at a resent xmltv file I have:

|  <programme start="20070215200000 +0100" stop="20070215201500 +0100" 
channel="ard.de">
|    <title lang="de">Tagesschau</title>

So, first of all, your new way of parsing seems to be correct (without
the minus chars). Why is it working at all right now? Are there xmltv
files with minus?

But next is that the timezone value is '+0100' which does not match %Z
(it would match %z but that is not implemented in Python). So your
code will fail, so will all your other guesses. To fix this once and
for all we need to collect the following information from many
grabber:

1. Is there a timezone setting?

2. If yes, is it like +0100 or something like EST, CEST?

3. Is it correct? In my case above it is. I live in +0100 in winter
   (the example is not summer time) and it starts at 20:00.

4. Would it still be correct if we don't parse the timezone? In my
   case yes, because my local time is +0100. As example, 
   20070215190000 +0200 would not be ok.



Dischi

-- 
Obviously the only rational solution to your problem is suicide.

Attachment: pgprOj5I3wdIE.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel

Reply via email to