Much better fix over previous commit.

pull/10/head
Ludovic Marcotte 2013-02-19 15:54:52 -05:00
parent 67c2d508ea
commit fa5e99d58d
2 changed files with 2 additions and 16 deletions

View File

@ -33,6 +33,7 @@ static NSDictionary *BSONTypes()
BSONTYPE(0x08, NSNumber),
BSONTYPE(0x0A, NSNull),
BSONTYPE(0x10, NSNumber),
BSONTYPE(0x11, NSCalendarDate),
BSONTYPE(0x12, NSNumber),
nil] retain];
}
@ -547,7 +548,7 @@ static NSDictionary *BSONTypes()
@implementation NSCalendarDate (BSON)
- (uint8_t) BSONTypeID
{
return 0x02;
return 0x11;
}
- (NSData *) BSONEncode

View File

@ -24,10 +24,8 @@
#include <stdbool.h>
#import <Foundation/NSData.h>
#import <Foundation/NSCalendarDate.h>
#import "NSString+MAPIStore.h"
#import "NSDate+MAPIStore.h"
#undef DEBUG
#include <talloc.h>
@ -69,19 +67,6 @@
return unicode;
}
// FIXME: This should go away at some point, when BSONCoder
// will correctly decode dates as NSCalendarDate objects
// instead of strings (because we first encode them as strings...)
- (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;