From da92c80484a02b0309663ac957f3cd81e1011488 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Tue, 8 Jul 2025 14:23:44 +0200 Subject: [PATCH] Fixed the stop time of repeating timers in case of DST change --- CONTRIBUTORS | 1 + HISTORY | 3 ++- timers.c | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index bb8f9d77..c334e27e 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2603,6 +2603,7 @@ Markus Ehrnsperger objects for reporting that cTimer::StartTime() may return different values, depending on the parameters of a previous call to cTimer::Matches() + for fixing the stop time of repeating timers in case of DST change Werner Färber for reporting a bug in handling the cPluginManager::Active() result when pressing diff --git a/HISTORY b/HISTORY index 8e88d05f..a560c13f 100644 --- a/HISTORY +++ b/HISTORY @@ -10138,7 +10138,7 @@ Video Disk Recorder Revision History - Fixed an invalid lock sequence when pressing the Channel+/Channel- keys while in the "What's on..." menu in live view. -2025-07-06: +2025-07-08: - Fixed cPoller::Poll() to allow negative timeout values again. - When regenerating the index of a recording, PID changes are now taken into account @@ -10164,3 +10164,4 @@ Video Disk Recorder Revision History removed in a future version, the macro DEPRECATED_TIMER_MATCHES can be set to 0 in timers.h. APIVERSNUM is now 30009. +- Fixed the stop time of repeating timers in case of DST change (thanks to Markus Ehrnsperger). diff --git a/timers.c b/timers.c index 35bf73a4..b03ab36e 100644 --- a/timers.c +++ b/timers.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: timers.c 5.26 2025/07/06 15:06:55 kls Exp $ + * $Id: timers.c 5.27 2025/07/08 14:23:44 kls Exp $ */ #include "timers.h" @@ -593,9 +593,9 @@ void cTimer::CalcStartStopTime(time_t &startTime, time_t &stopTime, time_t t) co time_t t0 = IncDay(d, i); if (DayMatches(t0)) { time_t a = SetTime(t0, begin); + time_t b = a + length; if (length < 0) - t0 = IncDay(d, i + 1); - time_t b = SetTime(t0, end); + b += SECSINDAY; if ((!day || a >= day) && t < b) { startTime = a; stopTime = b;