Added lastStartTime and lastEndTime to store the previous start/end time for the river.