Original commit message from CVS: Check validity of end time based on end time variable, not start time.