]> git.vomp.tv Git - vompclient.git/commitdiff
Fix for midnight timers choosing wrong date
authorChris Tallon <chris@vomp.tv>
Mon, 5 Nov 2007 21:47:36 +0000 (21:47 +0000)
committerChris Tallon <chris@vomp.tv>
Mon, 5 Nov 2007 21:47:36 +0000 (21:47 +0000)
vepgsettimer.cc

index 4059b1120ded5d3922da3bae34bc03bde18095c3..95c3216adfa9d1e2156a0cac0f4db2d30a41e502 100644 (file)
@@ -99,9 +99,6 @@ char* VEpgSetTimer::genTimerString()
 
   flags = 1; // hard coded active timer flag
 
-  btime = localtime((time_t*)&event->time);
-  strftime(dateString, 19, "%Y-%m-%d", btime);
-
   char* startMarginConfig = vdr->configLoad("Timers", "Start margin");
   if (startMarginConfig)
   {
@@ -112,6 +109,7 @@ char* VEpgSetTimer::genTimerString()
 
   startTime = event->time - (atoi(startMargin) * 60);
   btime = localtime(&startTime);
+  strftime(dateString, 19, "%Y-%m-%d", btime);
   strftime(startString, 9, "%H%M", btime);
 
   char* endMarginConfig = vdr->configLoad("Timers", "End margin");