Compute the time start and end for the timelines