replaced compare_date with at_time