diff --git a/OpenChange/MAPIStoreObject.m b/OpenChange/MAPIStoreObject.m index 1c4b26be4..ecb00dba3 100644 --- a/OpenChange/MAPIStoreObject.m +++ b/OpenChange/MAPIStoreObject.m @@ -23,7 +23,6 @@ #import #import #import -#import #import #import #import @@ -245,13 +244,8 @@ static Class NSExceptionK, MAPIStoreFolderK; struct SPropValue *cValue; NSUInteger counter; NSMutableDictionary *newProperties; - NSTimeZone *tz; - NSInteger tzOffset; id value; - tz = nil; - tzOffset = 0; - newProperties = [NSMutableDictionary dictionaryWithCapacity: aRow->cValues]; for (counter = 0; counter < aRow->cValues; counter++) { @@ -268,16 +262,6 @@ static Class NSExceptionK, MAPIStoreFolderK; @"attempting to set string property as PR_STRING8: %.8x", cValue->ulPropTag]; break; - case PT_SYSTIME: - if (!tz) - { - tz = [[self userContext] timeZone]; - tzOffset = -[tz secondsFromGMT]; - } - value = [value addYear: 0 month: 0 day: 0 - hour: 0 minute: 0 second: tzOffset]; - [value setTimeZone: tz]; - break; } [newProperties setObject: value forKey: MAPIPropertyKey (cValue->ulPropTag)]; diff --git a/OpenChange/MAPIStoreTypes.m b/OpenChange/MAPIStoreTypes.m index 01b650463..76e72c5d6 100644 --- a/OpenChange/MAPIStoreTypes.m +++ b/OpenChange/MAPIStoreTypes.m @@ -119,6 +119,7 @@ NSObjectFromMAPISPropValue (const struct mapi_SPropValue *value) break; case PT_SYSTIME: result = [NSCalendarDate dateFromFileTime: &(value->value.ft)]; + [result setTimeZone: utcTZ]; break; case PT_BINARY: case PT_SVREID: