mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed handling timers during the change from DST to winter time
This commit is contained in:
parent
54b721ebde
commit
8dcff164fa
@ -2839,6 +2839,7 @@ Johann Friedrichs <johann.friedrichs@web.de>
|
|||||||
be an abandoned member of class cSchedulesLock
|
be an abandoned member of class cSchedulesLock
|
||||||
for fixing handling VPS events outside the LingerLimit, which could cause recordings to
|
for fixing handling VPS events outside the LingerLimit, which could cause recordings to
|
||||||
stop prematurely
|
stop prematurely
|
||||||
|
for fixing handling timers during the change from DST to winter time
|
||||||
|
|
||||||
Timo Helkio <timolavi@mbnet.fi>
|
Timo Helkio <timolavi@mbnet.fi>
|
||||||
for reporting a hangup when replaying a TS recording with subtitles activated
|
for reporting a hangup when replaying a TS recording with subtitles activated
|
||||||
|
4
HISTORY
4
HISTORY
@ -9162,7 +9162,7 @@ Video Disk Recorder Revision History
|
|||||||
a subdirectory.
|
a subdirectory.
|
||||||
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
|
- SVDRP peering can now be limited to the default SVDRP host (see MANUAL for details).
|
||||||
|
|
||||||
2017-11-11: Version 2.3.9
|
2017-11-12: Version 2.3.9
|
||||||
|
|
||||||
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
- Updated the Italian OSD texts (thanks to Diego Pierotto).
|
||||||
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
|
||||||
@ -9199,3 +9199,5 @@ Video Disk Recorder Revision History
|
|||||||
- The new SVDRP commands 'LSTD' and 'PRIM' can be used to list all available devices
|
- The new SVDRP commands 'LSTD' and 'PRIM' can be used to list all available devices
|
||||||
and to switch the primary device (thanks to Thomas Reufer).
|
and to switch the primary device (thanks to Thomas Reufer).
|
||||||
- Added some comments regarding font height (thanks to Thomas Reufer).
|
- Added some comments regarding font height (thanks to Thomas Reufer).
|
||||||
|
- Fixed handling timers during the change from DST to winter time (thanks to Johann
|
||||||
|
Friedrichs).
|
||||||
|
21
timers.c
21
timers.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: timers.c 4.13 2017/11/09 12:10:46 kls Exp $
|
* $Id: timers.c 4.14 2017/11/12 13:01:22 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
@ -419,20 +419,25 @@ bool cTimer::Matches(time_t t, bool Directly, int Margin) const
|
|||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
|
|
||||||
int begin = TimeToInt(start); // seconds from midnight
|
int begin = TimeToInt(start); // seconds from midnight
|
||||||
int length = TimeToInt(stop) - begin;
|
int end = TimeToInt(stop);
|
||||||
if (length < 0)
|
int length = end - begin;
|
||||||
length += SECSINDAY;
|
|
||||||
|
|
||||||
if (IsSingleEvent()) {
|
if (IsSingleEvent()) {
|
||||||
startTime = SetTime(day, begin);
|
time_t t0 = day;
|
||||||
stopTime = startTime + length;
|
startTime = SetTime(t0, begin);
|
||||||
|
if (length < 0)
|
||||||
|
t0 = IncDay(day, 1);
|
||||||
|
stopTime = SetTime(t0, end);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
time_t d = day ? max(day, t) : t;
|
||||||
for (int i = -1; i <= 7; i++) {
|
for (int i = -1; i <= 7; i++) {
|
||||||
time_t t0 = IncDay(day ? max(day, t) : t, i);
|
time_t t0 = IncDay(d, i);
|
||||||
if (DayMatches(t0)) {
|
if (DayMatches(t0)) {
|
||||||
time_t a = SetTime(t0, begin);
|
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);
|
||||||
if ((!day || a >= day) && t < b) {
|
if ((!day || a >= day) && t < b) {
|
||||||
startTime = a;
|
startTime = a;
|
||||||
stopTime = b;
|
stopTime = b;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user