The results are formated for GMT output - i.e. if you are 5:3 hours away from GMT.
You need to specify a timezone if you want the date formated to be returned in that timezone: (that is what the +0000 means)
- (NSDate *)dateFromString:(NSString *)date
{
static NSDateFormatter *dateFormatter;
if (!dateFormatter)
{
dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setLocale:[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]];
[dateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
[dateFormatter setDateFormat:@"dd-MM-yyyy"];
}
NSLog(@"Date: %@ Formatted: %@",date,[dateFormatter dateFromString:date]);
return [dateFormatter dateFromString:date];
}