refactored to extract a common method for filling in the date and time for duration