Re: [vdr] [ANNOUNCE] Plugin LoadEPG 0.2.5

2013-02-28 Thread Teemu Suikki
Hi!

I think there is a bug in the timezone handling.

I installed the plugin.. It worked fine, but most channels had EPG moved by
1 hour, except Sky UK which had 2 hours of error..

Since I live in Finland, GMT+2, it would seem that the error comes from the
fact that Sky UK is GMT+0 and most other satellites are at GMT+1.

I looked into the source. This simple patch fixes it completely:

*** loadepg-0.2.5/loadepg.c 2013-01-21 19:55:00.0 +0200
--- loadepg-0.2.5_new/loadepg.c 2013-02-24 21:05:27.072158958 +0200
***
*** 2026,2032 
{
  SatelliteTimeOffset = SatelliteTimeOffsetH * 3600;
}
!   EpgTimeOffset = (LocalTimeOffset - SatelliteTimeOffset);
esyslog(LoadEPG: Satellite Time Offset=[UTC]%+i,
SatelliteTimeOffset / 3600);
esyslog(LoadEPG: Epg Time Offset=%+i seconds, EpgTimeOffset);
if(DEBUG)
--- 2026,2032 
{
  SatelliteTimeOffset = SatelliteTimeOffsetH * 3600;
}
!   EpgTimeOffset = 0; //(LocalTimeOffset - SatelliteTimeOffset);
esyslog(LoadEPG: Satellite Time Offset=[UTC]%+i,
SatelliteTimeOffset / 3600);
esyslog(LoadEPG: Epg Time Offset=%+i seconds, EpgTimeOffset);
if(DEBUG)


So.. I just waste your complicated timezone calculations, and insert
EpgTimeOffset = 0; at the end.. :) You could actually eliminate a lot of
the code before this patched line.

I think the problem is, unix time() function does not return time in
current time zone, but in UTC time (GMT+0). Also VDR epg data has UTC
timestamps. Also it must be that the satellite EPG data has also UTC time,
otherwise my patch wouldn't work. :) So there is no need to do any timezone
calculation at all!

The reason it has worked for most users, is because you all live in GMT+1,
same timezone as most of the satellites.. EpgTimeOffset is zero in that
case anyway. :) And if some british user is using it for Sky UK, it works
for him as well because the offset is zero. The bug only happens when user
and satellite are in different time zones.


--
Teemu




2013/1/31 lukkinosat lukkino...@yahoo.it

 Hello

 Is available the version 0.2.5 of the plugin LoadEPG for VDR = 1.7.35

 For VDR = 1.7.24 lastest release is the version 0.2.4

 The sources is here:
 http://lukkinosat.altervista.org

 For ArchLinux:
 https://aur.archlinux.org/packages/vdr-plugin-loadepg

 History:
 2013-01-21: Version 0.2.5
 - New Makefile for VDR = 1.7.35

 Description:
 This plugin load EPG data sent to MediaHighWay (Canal+ group)
 or SkyBox (Sky - News Corporation, Sky Italy, Sky Uk...) receivers,
 or executes external scripts and load EPG data from file.

 Hi, Luca

 Forum:
 http://forum.vdr-italia.org

 Web:
 http://www.vdr-italia.org


 ___
 vdr mailing list
 vdr@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr




-- 
Teemu Suikki
http://www.z-power.fi/
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] Plugin LoadEPG 0.2.5

2013-01-31 Thread lukkinosat
Hello

Is available the version 0.2.5 of the plugin LoadEPG for VDR = 1.7.35

For VDR = 1.7.24 lastest release is the version 0.2.4


The sources is here:
http://lukkinosat.altervista.org

For ArchLinux:
https://aur.archlinux.org/packages/vdr-plugin-loadepg


History:
2013-01-21: Version 0.2.5
- New Makefile for VDR = 1.7.35

Description:
This plugin load EPG data sent to
 MediaHighWay (Canal+ group)
or SkyBox (Sky - News Corporation, Sky Italy, Sky Uk...) receivers,
or executes external scripts and load EPG data from file.

Hi, Luca


Forum:
http://forum.vdr-italia.org

Web:
http://www.vdr-italia.org
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr