From 3457e2d476734616233a5be56fe173b1e60b97bc Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 3 May 2013 12:30:57 +0200 Subject: [PATCH] Fix DST bug in LegacyTimePeriod::ParseTimeSpec(). --- lib/icinga/legacytimeperiod.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/icinga/legacytimeperiod.cpp b/lib/icinga/legacytimeperiod.cpp index 5f961fe21..4c5390b13 100644 --- a/lib/icinga/legacytimeperiod.cpp +++ b/lib/icinga/legacytimeperiod.cpp @@ -126,6 +126,9 @@ int LegacyTimePeriod::MonthFromString(const String& monthdef) void LegacyTimePeriod::ParseTimeSpec(const String& timespec, tm *begin, tm *end, tm *reference) { + /* Let mktime() figure out whether we're in DST or not. */ + reference->tm_isdst = -1; + /* YYYY-MM-DD */ if (timespec.GetLength() == 10 && timespec[4] == '-' && timespec[7] == '-') { int year = Convert::ToLong(timespec.SubStr(0, 4)); -- 2.40.0