Fixed set_timestamps to work with any number of measurements per day.