SonarCloud python:S6890

This commit is contained in:
2024-04-21 16:09:40 +01:00
parent 8cb6f104a9
commit e9321704d5
2 changed files with 2 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
import pytz
from zoneinfo import ZoneInfo
from datetime import datetime
@@ -14,5 +14,5 @@ def timestamp_to_date(timestamp: int) -> str:
Returns:
str: Date in the format YYYY-MM-DD.
"""
return datetime.fromtimestamp(timestamp=timestamp, tz=pytz.utc).strftime("%Y-%m-%d")
return datetime.fromtimestamp(timestamp=timestamp, tz=ZoneInfo("UTC")).strftime("%Y-%m-%d")