How can I convert a NSTimeInterval to NSDate? Think of it like a stopwatch. I want the initial date to be 00:00:00, and I have a NSTimeInterv
I would advise against using NSDateFormatter if you wish to display time intervals. NSDateFormatter is useful when you wish to display times in the local, or a specific, timezone. But in this case it would be a bug if the time was timezone adjusted (e.g. one day per year has 23 hours).
NSTimeInterval time = ...;
NSString *string = [NSString stringWithFormat:@"%02li:%02li:%02li",
lround(floor(time / 3600.)) % 100,
lround(floor(time / 60.)) % 60,
lround(floor(time)) % 60];