summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/eit.c b/eit.c
index 8e8dd490..1189a108 100644
--- a/eit.c
+++ b/eit.c
@@ -8,7 +8,7 @@
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>.
*
- * $Id: eit.c 2.4 2009/05/10 14:47:31 kls Exp $
+ * $Id: eit.c 2.5 2009/05/15 12:34:43 kls Exp $
*/
#include "eit.h"
@@ -17,6 +17,8 @@
#include "libsi/section.h"
#include "libsi/descriptor.h"
+#define VALID_TIME (31536000 * 2) // two years
+
// --- cEIT ------------------------------------------------------------------
class cEIT : public SI::EIT {
@@ -46,6 +48,9 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo
struct tm tm_r;
struct tm t = *localtime_r(&Now, &tm_r); // this initializes the time zone in 't'
+ if (Now < VALID_TIME)
+ return; // we need the current time for handling PDC descriptors
+
SI::EIT::Event SiEitEvent;
for (SI::Loop::Iterator it; eventLoop.getNext(SiEitEvent, it); ) {
bool ExternalData = false;