Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use datetime.now instead of utznow #1983

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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