summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-02-22 13:33:20 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-02-22 13:33:20 +0100
commit8e616636526b9d7f7530d96dcb69efa1d9e011d2 (patch)
tree1c57f6a9592ba1f3a98f262655c5b3701ca1b523 /eit.c
parent45eac6d94694aa9081bdd0e06794942c49818ff1 (diff)
downloadvdr-8e616636526b9d7f7530d96dcb69efa1d9e011d2.tar.gz
vdr-8e616636526b9d7f7530d96dcb69efa1d9e011d2.tar.bz2
Implemented handling the VPS timestamps
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/eit.c b/eit.c
index 0ef3590b..e1f4509a 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 1.88 2004/02/21 13:26:52 kls Exp $
+ * $Id: eit.c 1.89 2004/02/22 13:17:52 kls Exp $
*/
#include "eit.h"
@@ -124,6 +124,21 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data)
break;
case SI::ParentalRatingDescriptorTag:
break;
+ case SI::PDCDescriptorTag: {
+ SI::PDCDescriptor *pd = (SI::PDCDescriptor *)d;
+ time_t now = time(NULL);
+ struct tm tm_r;
+ struct tm t = *localtime_r(&now, &tm_r); // this initializes the time zone in 't'
+ t.tm_isdst = -1; // makes sure mktime() will determine the correct DST setting
+ t.tm_mon = pd->getMonth() - 1;
+ t.tm_mday = pd->getDay();
+ t.tm_hour = pd->getHour();
+ t.tm_min = pd->getMinute();
+ t.tm_sec = 0;
+ time_t vps = mktime(&t);
+ pEvent->SetVps(vps);
+ }
+ break;
case SI::TimeShiftedEventDescriptorTag: {
SI::TimeShiftedEventDescriptor *tsed = (SI::TimeShiftedEventDescriptor *)d;
cSchedule *rSchedule = (cSchedule *)Schedules->GetSchedule(tChannelID(Source, 0, 0, tsed->getReferenceServiceId()));