mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
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)
|
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 */
|
/* YYYY-MM-DD */
|
||||||
if (timespec.GetLength() == 10 && timespec[4] == '-' && timespec[7] == '-') {
|
if (timespec.GetLength() == 10 && timespec[4] == '-' && timespec[7] == '-') {
|
||||||
int year = Convert::ToLong(timespec.SubStr(0, 4));
|
int year = Convert::ToLong(timespec.SubStr(0, 4));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user