Fix offset when converting event to all-day

Fixes #3655
This commit is contained in:
Francis Lachapelle
2016-05-20 10:05:03 -04:00
parent 03bbe63cdc
commit 0e2c6dc5cd
2 changed files with 2 additions and 8 deletions
+1 -8
View File
@@ -371,14 +371,7 @@
if (isAllDay)
{
nbrDays = ((float) abs ([aptEndDate timeIntervalSinceDate: aptStartDate]) / 86400) + 1;
// Convert all-day start date to GMT (floating date)
ud = [[context activeUser] userDefaults];
timeZone = [ud timeZone];
offset = [timeZone secondsFromGMTForDate: aptStartDate];
allDayStartDate = [aptStartDate dateByAddingYears: 0 months: 0 days: 0
hours: 0 minutes: 0
seconds: offset];
[self setAllDayWithStartDate: allDayStartDate
[self setAllDayWithStartDate: aptStartDate
duration: nbrDays];
}
else