Skip to content

Commit

Permalink
Use datetime.now
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Dec 2, 2024
1 parent c90bd57 commit 981b85f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ols/app/endpoints/feedback.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import json
import logging
from datetime import datetime
from datetime import UTC, datetime
from pathlib import Path
from typing import Any

Expand Down Expand Up @@ -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.now(tz=UTC))
data_to_store = {"user_id": user_id, "timestamp": current_time, **feedback}

# stores feedback in a file under unique uuid
Expand Down

0 comments on commit 981b85f

Please sign in to comment.