See Changelog

Monotone-Parent: 29ad2f44363331300de6fd559f5b2878bb4e2883
Monotone-Revision: 7644c155b02b86d417852ac59361714181ec8c18

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-01-21T21:56:09
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2011-01-21 21:56:09 +00:00
parent 00a7a97370
commit 84c08b964a
4 changed files with 84 additions and 10 deletions
+17 -1
View File
@@ -245,8 +245,10 @@
NSString *duration;
NSTimeZone *timeZone;
unsigned int total, hours, minutes;
signed int offset;
SOGoObject <SOGoComponentOccurence> *co;
SOGoUserDefaults *ud;
iCalTimeZone *eventTimeZone;
[self event];
co = [self clientObject];
@@ -280,7 +282,21 @@
isAllDay = [event isAllDay];
endDate = [event endDate];
if (isAllDay)
endDate = [endDate dateByAddingYears: 0 months: 0 days: -1];
{
endDate = [endDate dateByAddingYears: 0 months: 0 days: -1];
// Verify if the start date is "floating" (no timezone). In this case, convert it
// to the user's timezone.
eventTimeZone = [(iCalDateTime*)[event uniqueChildWithTag: @"dtstart"] timeZone];
if (eventTimeZone == nil)
{
offset = [timeZone secondsFromGMTForDate: startDate];
startDate = [startDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0
seconds:-offset];
endDate = [endDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0
seconds:-offset];
}
}
isTransparent = ![event isOpaque];
}