Much better fix over previous commit.
parent
67c2d508ea
commit
fa5e99d58d
|
@ -33,6 +33,7 @@ static NSDictionary *BSONTypes()
|
||||||
BSONTYPE(0x08, NSNumber),
|
BSONTYPE(0x08, NSNumber),
|
||||||
BSONTYPE(0x0A, NSNull),
|
BSONTYPE(0x0A, NSNull),
|
||||||
BSONTYPE(0x10, NSNumber),
|
BSONTYPE(0x10, NSNumber),
|
||||||
|
BSONTYPE(0x11, NSCalendarDate),
|
||||||
BSONTYPE(0x12, NSNumber),
|
BSONTYPE(0x12, NSNumber),
|
||||||
nil] retain];
|
nil] retain];
|
||||||
}
|
}
|
||||||
|
@ -547,7 +548,7 @@ static NSDictionary *BSONTypes()
|
||||||
@implementation NSCalendarDate (BSON)
|
@implementation NSCalendarDate (BSON)
|
||||||
- (uint8_t) BSONTypeID
|
- (uint8_t) BSONTypeID
|
||||||
{
|
{
|
||||||
return 0x02;
|
return 0x11;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSData *) BSONEncode
|
- (NSData *) BSONEncode
|
||||||
|
|
|
@ -24,10 +24,8 @@
|
||||||
#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>
|
||||||
|
@ -69,19 +67,6 @@
|
||||||
return unicode;
|
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) _decodeHexByte: (char) byteChar
|
||||||
{
|
{
|
||||||
char newByte;
|
char newByte;
|
||||||
|
|
Loading…
Reference in New Issue