mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-19 13:25:57 +00:00
Also handle date-strings as date objects.
Dates are stored as string in BSON - might change in the future.
This commit is contained in:
@@ -24,8 +24,10 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#import <Foundation/NSData.h>
|
||||
#import <Foundation/NSCalendarDate.h>
|
||||
|
||||
#import "NSString+MAPIStore.h"
|
||||
#import "NSDate+MAPIStore.h"
|
||||
|
||||
#undef DEBUG
|
||||
#include <talloc.h>
|
||||
@@ -67,6 +69,16 @@
|
||||
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 newByte;
|
||||
|
||||
Reference in New Issue
Block a user