summaryrefslogtreecommitdiff
path: root/ttools.c
diff options
context:
space:
mode:
Diffstat (limited to 'ttools.c')
-rw-r--r--ttools.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ttools.c b/ttools.c
index f48135d..168fe63 100644
--- a/ttools.c
+++ b/ttools.c
@@ -329,10 +329,13 @@ int updateRowByTimer(cDbRow* timerRow, const cTimer* t)
contentOfTag(t, "directory", directory, 512);
contentOfTag(t, "source", source, 40);
+ time_t startTime = hhmm2L(t->Start(), t->Day());
+ time_t endTime = hhmm2L(t->Stop(), t->Day() + t->Stop() < t->Start() ? tmeSecondsPerDay : 0);
+
timerRow->setValue("VDRUUID", Epg2VdrConfig.uuid);
timerRow->setValue("EVENTID", t->Event() ? (long)t->Event()->EventID() : 0);
- timerRow->setValue("_STARTTIME", t->Event() ? t->Event()->StartTime() : 0);
- timerRow->setValue("_ENDTIME", t->Event() ? t->StopTime() : 0);
+ timerRow->setValue("_STARTTIME", startTime);
+ timerRow->setValue("_ENDTIME", endTime);
timerRow->setValue("CHANNELID", channelId);
timerRow->setValue("DAY", t->Day());
timerRow->setValue("STARTTIME", t->Start());