GMM conversão de fuso horário no objetivo c
Estou tentando converter nsstring em nsdate e depois no fuso horário do sistema. Meu código está correto? Qualquer ajuda apreciad
NSString *str=@"2012-01-15 06:27:42";
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[NSDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehaviorDefault];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSDate *dateFromString = [dateFormatter dateFromString:str];
NSDate* sourceDate = dateFromString;
NSTimeZone* sourceTimeZone = [NSTimeZone timeZoneWithAbbreviation:@"GMT-07:00"];
NSTimeZone* destinationTimeZone = [NSTimeZone systemTimeZone];
NSInteger sourceGMTOffset = [sourceTimeZone secondsFromGMTForDate:sourceDate];
NSInteger destinationGMTOffset = [destinationTimeZone secondsFromGMTForDate:sourceDate];
NSTimeInterval interval = destinationGMTOffset - sourceGMTOffset;
NSDate* destinationDate = [[[NSDate alloc] initWithTimeInterval:interval sinceDate:sourceDate] autorelease];
bottomLabel2.text=[NSString stringWithFormat:@"- %@ -",destinationDate];
O resultado do código é 2012-01-15 06:27:42 +0000, que é o mesmo da fonte!