I am trying to convert my date string to NSDate
but its return correct date and wrong time.
This is my code :
NSString *dateStr = @"2013-12-20 12:10:40";
// Convert string to date object
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat: @"yyyy-MM-dd HH:mm:ss"];
NSDate *lastUpdatedate = [dateFormatter dateFromString:dateStr];
NSLog(@"lastUpdatedate : %@",lastUpdatedate);
It returns this :
lastUpdatedate : 2013-12-20 06:40:40 +0000