(fix) use GMT + adjust bias when querying Exchange's FB info

pull/228/head
Ludovic Marcotte 2016-11-25 15:14:24 -05:00
parent 35a3a8ef1d
commit d2e03386d2
4 changed files with 31 additions and 18 deletions

View File

@ -1,6 +1,6 @@
/* MSExchangeFreeBusy.m - this file is part of SOGo
*
* Copyright (C) 2012-2014 Inverse inc.
* Copyright (C) 2012-2016 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
/*
Copyright (C) 2012 Inverse inc.
Copyright (C) 2012-2016 Inverse inc.
This file is part of SOGo.

View File

@ -1,5 +1,5 @@
/*
Copyright (C) 2012 Inverse inc.
Copyright (C) 2012-2016 Inverse inc.
This file is part of SOGo.
@ -28,6 +28,8 @@
#import <SOGo/NSDictionary+Utilities.h>
#import <SOGo/NSObject+Utilities.h>
#import <SOGo/NSString+Utilities.h>
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#import "MSExchangeFreeBusySOAPRequest.h"
@ -110,4 +112,15 @@
return [NSString stringWithFormat: @"%i", interval];
}
- (NSString *) bias
{
NSTimeZone *userTimeZone;
NSInteger secs;
userTimeZone = [[[context activeUser] userDefaults] timeZone];
secs = [userTimeZone secondsFromGMT];
return [NSString stringWithFormat: @"%i", (secs/60)];
}
@end

View File

@ -7,21 +7,21 @@
<GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<t:TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
<Bias>0</Bias>
<StandardTime>
<Bias>0</Bias>
<Time>00:00:00</Time>
<DayOrder>1</DayOrder>
<Month>1</Month>
<DayOfWeek>Sunday</DayOfWeek>
</StandardTime>
<DaylightTime>
<Bias>0</Bias>
<Time>00:00:00</Time>
<DayOrder>1</DayOrder>
<Month>1</Month>
<DayOfWeek>Sunday</DayOfWeek>
</DaylightTime>
<Bias><#bias/></Bias>
<StandardTime>
<Bias>0</Bias>
<Time>02:00:00</Time>
<DayOrder>1</DayOrder>
<Month>11</Month>
<DayOfWeek>Sunday</DayOfWeek>
</StandardTime>
<DaylightTime>
<Bias>-60</Bias>
<Time>02:00:00</Time>
<DayOrder>2</DayOrder>
<Month>3</Month>
<DayOfWeek>Sunday</DayOfWeek>
</DaylightTime>
</t:TimeZone>
<MailboxDataArray>
<t:MailboxData>