I have a time picker which displays time in 12 Hour format. Internally i am converting it to 24 Hour format. The problem is, if the time taken is 10:24, it displays 10:01. i.e 'now' will have 10:24 and 'self.currentTime' will have 10:01. What am i doing wrong.
NSDate *now = [timePicker date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.dateFormat = @"HH:MM:SS";
self.currentTime = [dateFormatter stringFromDate:now];
NSLog(@"The Current Time is %@",self.currentTime);
Thank you.