Fixed setting fromTime and toTime.