mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-27 00:52:45 +00:00
Much better fix over previous commit.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user