record start and end times