From 19923d10dbcba8598f4b2ed3aec86b2fe508a68f Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 19 Feb 2013 15:30:29 -0500 Subject: [PATCH] Also handle date-strings as date objects. Dates are stored as string in BSON - might change in the future. --- OpenChange/NSString+MAPIStore.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/OpenChange/NSString+MAPIStore.m b/OpenChange/NSString+MAPIStore.m index 83ca8d6e6..647eb79f1 100644 --- a/OpenChange/NSString+MAPIStore.m +++ b/OpenChange/NSString+MAPIStore.m @@ -24,8 +24,10 @@ #include #import +#import #import "NSString+MAPIStore.h" +#import "NSDate+MAPIStore.h" #undef DEBUG #include @@ -67,6 +69,16 @@ return unicode; } +- (struct FILETIME *) asFileTimeInMemCtx: (void *) memCtx +{ + NSCalendarDate *d; + + d = [NSCalendarDate dateWithString: self + calendarFormat: @"%Y-%m-%d %H:%M:%S %Z"]; + + return [d asFileTimeInMemCtx: memCtx]; +} + - (char) _decodeHexByte: (char) byteChar { char newByte;