From a112bc3e579ca6d0dab2d20bb5d722f613597534 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 28 Jan 2024 16:51:54 -0500 Subject: [PATCH] Set time to UTC for schedule remove prints --- app/classes/controllers/users_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/classes/controllers/users_controller.py b/app/classes/controllers/users_controller.py index 80a431bf..c478f887 100644 --- a/app/classes/controllers/users_controller.py +++ b/app/classes/controllers/users_controller.py @@ -2,6 +2,7 @@ import logging import typing as t import datetime from datetime import timedelta +from zoneinfo import ZoneInfo from apscheduler.schedulers.background import BackgroundScheduler from app.classes.models.servers import HelperServers @@ -387,10 +388,9 @@ class UsersController: self.stop_anti_lockout, "date", id="anti-lockout-watcher", - run_date=datetime.datetime.now() + timedelta(hours=1), + run_date=datetime.datetime.now(ZoneInfo("Etc/UTC")) + timedelta(hours=1), ) def stop_anti_lockout(self): - print("IN STOP") self.scheduler.remove_all_jobs() self.users_helper.remove_user(self.get_id_by_name("anti-lockout-user"))