When I try to parse a date value into my core data using JSON, the date value is deducted by one day. e.g in JSON I write: "date": "14/03/13" and it stores it as 13/03/13 in my coredata. Any ideas as to why this is happening?? Below is my code
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"dd - MM - yy"];
[dateFormatter setCalendar:[[NSCalendar alloc]initWithCalendarIdentifier:NSGregorianCalendar]];
dayinfo.date = [dateFormatter dateFromString:[obj objectForKey:@"date"]];