[icinga-checkins] icinga.org: icinga2/master: Fix DST bug in LegacyTimePeriod::ParseTimeSpec( ).

git at icinga.org git at icinga.org
Fri May 3 12:31:42 CEST 2013


Module: icinga2
Branch: master
Commit: 3457e2d476734616233a5be56fe173b1e60b97bc
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=3457e2d476734616233a5be56fe173b1e60b97bc

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Fri May  3 12:30:57 2013 +0200

Fix DST bug in LegacyTimePeriod::ParseTimeSpec().

---

 lib/icinga/legacytimeperiod.cpp |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/icinga/legacytimeperiod.cpp b/lib/icinga/legacytimeperiod.cpp
index 5f961fe..4c5390b 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));





More information about the icinga-checkins mailing list