From 17b3d9341b3f47bd62d05c1ef765315f92d34ca5 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Sun, 28 Oct 2018 13:06:12 +0100 Subject: [PATCH] fix typo, use function for time diff Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/d7795f2ba6e22ef69be8388ff3d0ff406cae06d1 Author: TangoCash Date: 2018-10-28 (Sun, 28 Oct 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/eitd/xmlutil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index 0b8c4f798..330192bf0 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -478,12 +478,12 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count) strptime(start, "%Y%m%d%H%M%S %z", &starttime); strptime(stop, "%Y%m%d%H%M%S %z", &stoptime); time_t start_time = mktime(&starttime) + starttime.tm_gmtoff; - time_t duration = mktime(&stoptime) + starttime.tm_gmtoff - start_time; + time_t duration = mktime(&stoptime) + stoptime.tm_gmtoff - start_time; t_channel_id epgid = 0; time_t current_time; time(¤t_time); - time_t time_diff = current_time - (start_time + duration); + double time_diff = difftime(current_time, start_time + duration); // just loads events if they end is in the future if (time_diff < 0)