mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 23:13:00 +02:00
fix typo, use function for time diff
Origin commit data
------------------
Commit: d7795f2ba6
Author: TangoCash <eric@loxat.de>
Date: 2018-10-28 (Sun, 28 Oct 2018)
This commit is contained in:
@@ -478,12 +478,12 @@ bool readEventsFromXMLTV(std::string &epgname, int &ev_count)
|
|||||||
strptime(start, "%Y%m%d%H%M%S %z", &starttime);
|
strptime(start, "%Y%m%d%H%M%S %z", &starttime);
|
||||||
strptime(stop, "%Y%m%d%H%M%S %z", &stoptime);
|
strptime(stop, "%Y%m%d%H%M%S %z", &stoptime);
|
||||||
time_t start_time = mktime(&starttime) + starttime.tm_gmtoff;
|
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;
|
t_channel_id epgid = 0;
|
||||||
time_t current_time;
|
time_t current_time;
|
||||||
time(¤t_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
|
// just loads events if they end is in the future
|
||||||
if (time_diff < 0)
|
if (time_diff < 0)
|
||||||
|
Reference in New Issue
Block a user