(fix) better handle timezone changes (fixes #4624)

pull/248/head
Ludovic Marcotte 2018-12-20 13:37:59 -05:00
parent af70306d9a
commit e418fcb6ca
2 changed files with 23 additions and 4 deletions

View File

@ -78,10 +78,28 @@ struct SYSTEMTIME {
tzData->wDay = ([mask firstOccurrence] == -1) ? 5 : [mask firstOccurrence];
dateValue = [self startDate];
tzData->wHour = [dateValue hourOfDay];
tzData->wMinute = [dateValue minuteOfHour];
tzData->wSecond = [dateValue secondOfMinute];
tzData->wMilliseconds = 0;
if (![dateValue hourOfDay])
{
if ([mask firstDay]-1 < 0)
tzData->wDayOfWeek = 6;
else
tzData->wDayOfWeek = [mask firstDay]-1;
tzData->wHour = 23;
tzData->wMinute = 59;
tzData->wSecond = 59;
tzData->wMilliseconds = 999;
}
else
{
tzData->wDayOfWeek = [mask firstDay];
tzData->wHour = [dateValue hourOfDay];
tzData->wMinute = [dateValue minuteOfHour];
tzData->wSecond = [dateValue secondOfMinute];
tzData->wMilliseconds = 0;
}
}
}

1
NEWS
View File

@ -23,6 +23,7 @@ Bug fixes
- [eas] improve search operations and results fetching
- [eas] better handle bogus DTStart values
- [eas] support for basic UserInformation queries (#4614)
- [eas] better handle timezone changes (#4624)
4.0.4 (2018-10-23)
------------------