update the timestamp middleware