how can I add a condition for time?