Add APM #184
@ -1,6 +1,6 @@
|
||||
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import pytz
|
||||
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and laterDon't use `pytz` module with Python 3.9 and later.See more on SonarCloud ## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
<!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p>
[Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
|
||||
from zoneinfo import ZoneInfo
|
||||
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and laterDon't use `pytz` module with Python 3.9 and later.See more on SonarCloud ## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
<!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p>
[Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
@ -14,5 +14,5 @@ def timestamp_to_date(timestamp: int) -> str:
|
||||
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and laterDon't use `pytz` module with Python 3.9 and later.See more on SonarCloud ## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
<!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p>
[Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and laterDon't use `pytz` module with Python 3.9 and later.See more on SonarCloud ## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
<!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p>
[Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
|
||||
Returns:
|
||||
str: Date in the format YYYY-MM-DD.
|
||||
"""
|
||||
return datetime.fromtimestamp(timestamp=timestamp, tz=pytz.utc).strftime("%Y-%m-%d")
|
||||
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and laterDon't use `pytz` module with Python 3.9 and later.See more on SonarCloud ## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
<!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p>
[Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
|
||||
return datetime.fromtimestamp(timestamp=timestamp, tz=ZoneInfo("UTC")).strftime("%Y-%m-%d")
|
||||
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and laterDon't use `pytz` module with Python 3.9 and later.See more on SonarCloud ## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
<!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p>
[Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
|
||||
|
||||
|
||||
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and laterDon't use `pytz` module with Python 3.9 and later.See more on SonarCloud ## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
<!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p>
[Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and laterDon't use `pytz` module with Python 3.9 and later.See more on SonarCloud ## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
<!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p>
[Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
Don't use `pytz` module with Python 3.9 and later.See more on SonarCloud
Show more details
"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later
Don't use `pytz` module with Python 3.9 and later.See more on SonarCloud
Show more details