summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2020-02-15 10:55:30 +0100
committerhorchi <vdr@jwendel.de>2020-02-15 10:55:30 +0100
commit2387a5893be264e59e60a8f9e1c302c53b791128 (patch)
treed4d83be2ffac24eebd07af5a8854e41a592ab539 /lib
parentdddd5c42b27d936f22468f95e3da0a776451dbb7 (diff)
downloadvdr-plugin-epg2vdr-1.1.107.tar.gz
vdr-plugin-epg2vdr-1.1.107.tar.bz2
2020-02-14: version 1.1.107 (horchi,seahawk1986)\n - bugfix: Fixed cleanup of image links\n - change: Improved cleanup spead for images and links\n - bugfix: Fixed time handling for timers without event\n\n1.1.107
Diffstat (limited to 'lib')
-rw-r--r--lib/common.c7
-rw-r--r--lib/common.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/common.c b/lib/common.c
index a452b23..e6bafae 100644
--- a/lib/common.c
+++ b/lib/common.c
@@ -672,6 +672,11 @@ int l2hhmm(time_t t)
return tm.tm_hour * 100 + tm.tm_min;
}
+time_t hhmm2L(int hhmm, time_t offset)
+{
+ return ((hhmm/100) * tmeSecondsPerHour) + ((hhmm%100) * tmeSecondsPerMinute) + offset;
+}
+
//***************************************************************************
// HHMM to Pretty Time
//***************************************************************************
@@ -977,7 +982,6 @@ int removeFile(const char* filename)
if (unlink(filename) != 0)
{
tell(0, "Can't remove file '%s', '%s'", filename, strerror(errno));
-
return 1;
}
@@ -1027,6 +1031,7 @@ xsltStylesheetPtr loadXSLT(const char* name, const char* path, int utf8)
tell(0, "Info: Stylesheet '%s' loaded", xsltfile);
free(xsltfile);
+
return stylesheet;
}
#endif
diff --git a/lib/common.h b/lib/common.h
index c8361ec..27c1772 100644
--- a/lib/common.h
+++ b/lib/common.h
@@ -292,6 +292,7 @@ const char* toWeekdayName(uint day);
time_t hhmmOf(time_t t);
int l2hhmm(time_t t);
std::string hhmm2pTime(int hhmm);
+time_t hhmm2L(int hhmm, time_t offset = 0);
time_t midnightOf(time_t t);
std::string l2pTime(time_t t, const char* format = "%d.%m.%Y %T");
std::string l2pDate(time_t t);