aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-09-12 21:28:30 +0000
committerrowanbeentje <rowan@beent.je>2011-09-12 21:28:30 +0000
commitb98ecf79612efe4753c885670bad1a16c75c79c0 (patch)
tree5d042151772cfb2f0654a348fc1f4836f3091755 /Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
parentb9c291f25670d591b2ba9bbd3467f76bf1218e7f (diff)
downloadsequelpro-b98ecf79612efe4753c885670bad1a16c75c79c0.tar.gz
sequelpro-b98ecf79612efe4753c885670bad1a16c75c79c0.tar.bz2
sequelpro-b98ecf79612efe4753c885670bad1a16c75c79c0.zip
- Improve time zone checking to account for NULL timezones, which should address Issue #1181
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 0e96ce5d..19de4ddb 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -3276,7 +3276,7 @@ void pingThreadCleanup(void *pingDetails)
* Retrieve connection variables and use them to update local variables - incuding
* server version string, server time zone, and the current connection encoding.
*/
-- (void)_updateConnectionVariables;
+- (void)_updateConnectionVariables
{
if (!mConnected) return;
@@ -3301,7 +3301,7 @@ void pingThreadCleanup(void *pingDetails)
// Get the timezone
NSString *serverTimeZoneName = nil;
NSTimeZone *serverTimeZone = nil;
- if ([variables objectForKey:@"time_zone"]) {
+ if ([variables objectForKey:@"time_zone"] && ![[variables objectForKey:@"time_zone"] isNSNull]) {
if ([[variables objectForKey:@"time_zone"] isEqualToString:@"SYSTEM"]) {
if ([variables objectForKey:@"system_time_zone"]) {
serverTimeZoneName = [variables objectForKey:@"system_time_zone"];
@@ -3309,7 +3309,7 @@ void pingThreadCleanup(void *pingDetails)
} else {
serverTimeZoneName = [variables objectForKey:@"time_zone"];
}
- } else if ([variables objectForKey:@"timezone"]) {
+ } else if ([variables objectForKey:@"timezone"] && ![[variables objectForKey:@"timezone"] isNSNull]) {
serverTimeZoneName = [variables objectForKey:@"timezone"];
}
if (!serverTimeZoneName) {