I want to retrieve all the entries from core data added between two dates.I am using NSPredicate
. As I am not getting the correct result I tried logging the date.I
If you log an NSDate object directly it will always display the tome in GMT/UTC timezone. you have to log the output of a date formatter.
NSLog(@"%@",[self.dateFormatter stringFromDate:toDate]);
This will take your timezone in account. Or better: the timezone of the dateformatter's calendar — what is the device default if you dont change that.