diff --git a/thermostat.py b/thermostat.py index c463e71..b511832 100644 --- a/thermostat.py +++ b/thermostat.py @@ -82,7 +82,7 @@ def auth_required(func): ## def now(): - return "["+datetime.datetime.now().strftime("%c")+"]" + return "["+datetime.now().strftime("%c")+"]" def enabled_rooms(): rooms_list=[] @@ -236,7 +236,7 @@ while True: # Force immediate action: last_control_time = None current_time = time.time() - current_date = datetime.datetime.now() + current_date = datetime.now() today_awake_time = current_date.replace(hour=int(awake_hour.split(':')[0]), minute=int(awake_hour.split(':')[1]), second=0, microsecond=0) today_sleep_time = current_date.replace(hour=int(sleep_hour.split(':')[0]), minute=int(sleep_hour.split(':')[1]), second=0, microsecond=0) forced_mode = get_forced_mode()