Timezon in xmltv

General discussions over DVBLink products

Timezon in xmltv

Postby cYrus » Sat Oct 08, 2011 9:24 am

Dvblink v4 has a strange issue with xmltv timezone. If i have a start-tag with a timezone of +0200 it works correctly. If the timezone is +0100 it still works as expected. BUT if the timezone is +0000 or if there's no timezone at all it automatically uses a +0200 timezone.

How can i use an xmltv-file which doesn't need timezone correction?
cYrus
 
Posts: 19
Joined: Sun Sep 06, 2009 8:03 pm


Re: Timezon in xmltv

Postby cYrus » Mon Oct 17, 2011 10:06 am

hey oberon,

how did you implement the time-parser for the xml-files? i don't want timezone adjustments.

this doesn't work:
<programme start="20080715003000 +0000" stop="20080715010000 +0000" channel="I10436.labs.zap2it.com">

that doesn't work as well:
<programme start="20080715003000" stop="20080715010000" channel="I10436.labs.zap2it.com">
cYrus
 
Posts: 19
Joined: Sun Sep 06, 2009 8:03 pm

Re: Timezon in xmltv

Postby Oberon » Mon Oct 17, 2011 10:16 am

What exactly does not work with this line:
<programme start="20080715003000 +0000" stop="20080715010000 +0000" channel="I10436.labs.zap2it.com">
?

DVBLink xmltv parser expects UTC times (according to xmltv spec). So if you are in timezone +3 hours for example and program starts at 20:00 it should be
Code: Select all
programme start="20080715200000 +0300"

It might be that when timezone in your xmltv file is +0000 then start/stop times are shifted and are not in UTC anymore.

In any case a workaround can be to use channels.xml file that is in the xmltv source directory:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<channels>
<!-- list of channels. Each channel is identified by its ID that should be the same as in xmltv file -->      

<!-- (Optional) This is special entry, which applies to all channels (unless they are specified explicitely below) -->      
   <channel id="6AAF3CCD-0EB8-4346-9D87-799217A283EA">
      <offset>0</offset>
   </channel>

<!-- <channel id="channel id"> -->      
<!-- Optional. time offset for a channel in minutes (can be either positive or negative) -->      
<!-- <offset>time offset in minutes</offset> -->      
<!-- Optional. Defines whether this channel is HDTV -->      
<!--  <hdtv/> -->      
</channels>
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am

Re: Timezon in xmltv

Postby cYrus » Mon Oct 17, 2011 5:16 pm

Oberon wrote:What exactly does not work with this line:
<programme start="20080715003000 +0000" stop="20080715010000 +0000" channel="I10436.labs.zap2it.com">
?


with such a line, dvblink uses a timezone-shift of +0200. (that happens to be the same amount of time as the UTC-shift: i'm from Switzerland which has UTC+2)

BUT if i'm using e.g.

<programme start="20080715003000 +0100" stop="20080715010000 +0100" channel="I10436.labs.zap2it.com">
-> this shifts the time exactly one hour to the future. (that's what i've expected)

<programme start="20080715003000 +0200" stop="20080715010000 +0200" channel="I10436.labs.zap2it.com">
-> this shifts the time exactly two hour to the future. (that's what i've expected too)

<programme start="20080715003000 +0000" stop="20080715010000 +0000" channel="I10436.labs.zap2it.com">
-> this shifts the time exactly two hour to the future. (that's what i don't understand. it looks like a bug)


DVBLink xmltv parser expects UTC times (according to xmltv spec). So if you are in timezone +3 hours for example and program starts at 20:00 it should be
Code: Select all
programme start="20080715200000 +0300"

It might be that when timezone in your xmltv file is +0000 then start/stop times are shifted and are not in UTC anymore.

In any case a workaround can be to use channels.xml file that is in the xmltv source directory:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<channels>
<!-- list of channels. Each channel is identified by its ID that should be the same as in xmltv file -->      

<!-- (Optional) This is special entry, which applies to all channels (unless they are specified explicitely below) -->      
   <channel id="6AAF3CCD-0EB8-4346-9D87-799217A283EA">
      <offset>0</offset>
   </channel>

<!-- <channel id="channel id"> -->      
<!-- Optional. time offset for a channel in minutes (can be either positive or negative) -->      
<!-- <offset>time offset in minutes</offset> -->      
<!-- Optional. Defines whether this channel is HDTV -->      
<!--  <hdtv/> -->      
</channels>


well that would be a workaround but it looks like a lot of work if you use a mix of dvb-epg and xmltv-epg.
cYrus
 
Posts: 19
Joined: Sun Sep 06, 2009 8:03 pm

Re: Timezon in xmltv

Postby Oberon » Tue Oct 18, 2011 7:52 am

We will have a look.
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am

Re: Timezon in xmltv

Postby Oberon » Wed Oct 19, 2011 10:49 am

Just checked.
These two lines:
Code: Select all
<programme start="20080715003000 +0200" stop="20080715010000 +0200" channel="I10436.labs.zap2it.com">
<programme start="20080715003000 +0000" stop="20080715010000 +0000" channel="I10436.labs.zap2it.com">

produce different results - e.g. shifted by two hours. Can it be some other factors that play on your machine? Have you changed the timezone on your PC while experimenting?
Oberon
 
Posts: 11763
Joined: Thu Sep 06, 2007 5:04 am


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests

cron