Also handle date-strings as date objects.

Dates are stored as string in BSON - might change in the future.
This commit is contained in:
Ludovic Marcotte 2013-02-19 15:30:29 -05:00
parent e57b6835e6
commit 19923d10db

View file

@ -24,8 +24,10 @@
#include <stdbool.h> #include <stdbool.h>
#import <Foundation/NSData.h> #import <Foundation/NSData.h>
#import <Foundation/NSCalendarDate.h>
#import "NSString+MAPIStore.h" #import "NSString+MAPIStore.h"
#import "NSDate+MAPIStore.h"
#undef DEBUG #undef DEBUG
#include <talloc.h> #include <talloc.h>
@ -67,6 +69,16 @@
return unicode; 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) _decodeHexByte: (char) byteChar
{ {
char newByte; char newByte;