NSString *dateStr = @"2012-05-03 06:03:00 +0000"; NSDateFormatter *datFormatter = [[NSDateFormatter alloc] init]; [datFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss Z"]; NSDate* date = [datFormatter dateFromString:dateStr]; NSLog(@"date: %@", [datFormatter stringFromDate:date]);
This code prints date: 2012-05-03 09:03:00 +0300
It works. Also remember to set the dateZone date format you are targeting
source share