summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY4
-rw-r--r--config.c5
-rw-r--r--recording.c4
3 files changed, 9 insertions, 4 deletions
diff --git a/HISTORY b/HISTORY
index bf7f5f61..f3b14b36 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1120,7 +1120,7 @@ Video Disk Recorder Revision History
exits. The 'runvdr' script can be used for this purpose.
- Refined texts of the "Setup" menu.
-2002-03-29: Version 1.0.0pre5
+2002-04-01: Version 1.0.0pre5
- Fixed restoring CICAM setup values for a fourth DVB card (thanks to Klaus Wolf).
- Completed internationalization of OSD texts (thanks to Hannu Savolainen,
@@ -1159,3 +1159,5 @@ Video Disk Recorder Revision History
the use of an external 'df' command (thanks to Ruben Nunez Francisco).
- Fixed skipping the next hit of a repeating timer (thanks to Rainer Zocholl
for reporting this one).
+- Fixed a bug when a timer records over midnight of a day that had a change in
+ Daylight Saving Time.
diff --git a/config.c b/config.c
index 54b826db..ca6d6f82 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.94 2002/03/31 21:17:24 kls Exp $
+ * $Id: config.c 1.95 2002/04/01 10:54:32 kls Exp $
*/
#include "config.h"
@@ -439,6 +439,7 @@ int cTimer::ParseDay(const char *s, time_t *FirstDay)
tm_r.tm_year -= 1900;
tm_r.tm_mon--;
tm_r.tm_hour = tm_r.tm_min = tm_r.tm_sec = 0;
+ tm_r.tm_isdst = -1; // makes sure mktime() will determine the correct DST setting
*FirstDay = mktime(&tm_r);
}
}
@@ -560,6 +561,7 @@ time_t cTimer::IncDay(time_t t, int Days)
tm tm = *localtime_r(&t, &tm_r);
tm.tm_mday += Days; // now tm_mday may be out of its valid range
int h = tm.tm_hour; // save original hour to compensate for DST change
+ tm.tm_isdst = -1; // makes sure mktime() will determine the correct DST setting
t = mktime(&tm); // normalize all values
tm.tm_hour = h; // compensate for DST change
return mktime(&tm); // calculate final result
@@ -572,6 +574,7 @@ time_t cTimer::SetTime(time_t t, int SecondsFromMidnight)
tm.tm_hour = SecondsFromMidnight / 3600;
tm.tm_min = (SecondsFromMidnight % 3600) / 60;
tm.tm_sec = SecondsFromMidnight % 60;
+ tm.tm_isdst = -1; // makes sure mktime() will determine the correct DST setting
return mktime(&tm);
}
diff --git a/recording.c b/recording.c
index bcbdfa65..b19e8b73 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.59 2002/03/23 16:15:32 kls Exp $
+ * $Id: recording.c 1.60 2002/04/01 10:51:23 kls Exp $
*/
#include "recording.h"
@@ -343,7 +343,7 @@ cRecording::cRecording(const char *FileName)
time_t now = time(NULL);
struct tm tm_r;
struct tm t = *localtime_r(&now, &tm_r); // this initializes the time zone in 't'
- t.tm_isdst = -1; // makes sure mktime() will determine the correct dst setting
+ t.tm_isdst = -1; // makes sure mktime() will determine the correct DST setting
if (7 == sscanf(p + 1, DATAFORMAT, &t.tm_year, &t.tm_mon, &t.tm_mday, &t.tm_hour, &t.tm_min, &priority, &lifetime)) {
t.tm_year -= 1900;
t.tm_mon--;