From fa5e99d58dd9a70602e47481bd02e70c76e2727f Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 19 Feb 2013 15:54:52 -0500 Subject: [PATCH] Much better fix over previous commit. --- OpenChange/BSONCodec.m | 3 ++- OpenChange/NSString+MAPIStore.m | 15 --------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/OpenChange/BSONCodec.m b/OpenChange/BSONCodec.m index 430ee0f3a..34e5cdfd6 100644 --- a/OpenChange/BSONCodec.m +++ b/OpenChange/BSONCodec.m @@ -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 diff --git a/OpenChange/NSString+MAPIStore.m b/OpenChange/NSString+MAPIStore.m index 617f2d7e5..83ca8d6e6 100644 --- a/OpenChange/NSString+MAPIStore.m +++ b/OpenChange/NSString+MAPIStore.m @@ -24,10 +24,8 @@ #include #import -#import #import "NSString+MAPIStore.h" -#import "NSDate+MAPIStore.h" #undef DEBUG #include @@ -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;