diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-02-22 13:33:20 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-02-22 13:33:20 +0100 |
commit | 8e616636526b9d7f7530d96dcb69efa1d9e011d2 (patch) | |
tree | 1c57f6a9592ba1f3a98f262655c5b3701ca1b523 /eit.c | |
parent | 45eac6d94694aa9081bdd0e06794942c49818ff1 (diff) | |
download | vdr-8e616636526b9d7f7530d96dcb69efa1d9e011d2.tar.gz vdr-8e616636526b9d7f7530d96dcb69efa1d9e011d2.tar.bz2 |
Implemented handling the VPS timestamps
Diffstat (limited to 'eit.c')
-rw-r--r-- | eit.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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())); |