Fix DST bug in LegacyTimePeriod::ParseTimeSpec().

This commit is contained in:
Gunnar Beutner 2013-05-03 12:30:57 +02:00
parent 10dff1d8c1
commit 3457e2d476
1 changed files with 3 additions and 0 deletions

View File

@ -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));