Add start and end time to metadata