SonarCloud python:S6890
This commit is contained in:
		| @@ -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") | ||||
|  | ||||
|   | ||||
| @@ -30,7 +30,6 @@ PyJWT==2.8.0 | ||||
| pyparsing==3.1.2 | ||||
| python-dateutil==2.9.0.post0 | ||||
| python-dotenv==1.0.1 | ||||
| pytz==2024.1 | ||||
| PyYAML==6.0.1 | ||||
| requests==2.31.0 | ||||
| requests-toolbelt==1.0.0 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user