It is enougth to do `datetime.time(refresh_hour, refresh_min)` It simplifies the code as you don't need now.