From e5935c66ad60c0bc7db9fa3d10d61438fc9b8a59 Mon Sep 17 00:00:00 2001 From: Pavel Tisnovsky Date: Mon, 2 Dec 2024 08:43:22 +0100 Subject: [PATCH] Use datetime.now --- ols/app/endpoints/feedback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ols/app/endpoints/feedback.py b/ols/app/endpoints/feedback.py index 9da929230..345ea831b 100644 --- a/ols/app/endpoints/feedback.py +++ b/ols/app/endpoints/feedback.py @@ -65,7 +65,7 @@ def store_feedback(user_id: str, feedback: dict) -> None: storage_path = Path(config.ols_config.user_data_collection.feedback_storage) storage_path.mkdir(parents=True, exist_ok=True) - current_time = str(datetime.utcnow()) + current_time = str(datetime.datetime.now(tz=datetime.UTC)) data_to_store = {"user_id": user_id, "timestamp": current_time, **feedback} # stores feedback in a file under unique uuid