Also handle date-strings as date objects.

Dates are stored as string in BSON - might change in the future.
pull/10/head
Ludovic Marcotte 2013-02-19 15:30:29 -05:00
parent e57b6835e6
commit 19923d10db
1 changed files with 12 additions and 0 deletions

View File

@ -24,8 +24,10 @@
#include <stdbool.h>
#import <Foundation/NSData.h>
#import <Foundation/NSCalendarDate.h>
#import "NSString+MAPIStore.h"
#import "NSDate+MAPIStore.h"
#undef DEBUG
#include <talloc.h>
@ -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;