#1217 - Changing date formatter to use device's system timezone and to give both timezone abbreviation as well as hour offset

This commit is contained in:
Brad Leege
2015-04-06 17:50:02 -05:00
parent 17ded82d87
commit 67ce07cada

View File

@@ -164,8 +164,9 @@ NSString *const MGLEventGestureRotateStart = @"Rotation";
NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
[_rfc3339DateFormatter setLocale:enUSPOSIXLocale];
[_rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"];
[_rfc3339DateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
[_rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss z Z"];
[NSTimeZone resetSystemTimeZone];
[_rfc3339DateFormatter setTimeZone:[NSTimeZone systemTimeZone]];
}
return self;
}