mirror of https://github.com/Icinga/icinga2.git
Fix DST bug in LegacyTimePeriod::ParseTimeSpec().
This commit is contained in:
parent
10dff1d8c1
commit
3457e2d476
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue