diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e190e35..506f8ce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,5 @@ jobs: pip install -e . pip install pytest pip install pytest-asyncio - pip install pytz - name: Run pytest run: python -m pytest tests/ diff --git a/lennoxs30api/metrics.py b/lennoxs30api/metrics.py index d114093..678c8f3 100644 --- a/lennoxs30api/metrics.py +++ b/lennoxs30api/metrics.py @@ -1,8 +1,7 @@ """Communication Metrics for communication to lennox controller""" # pylint: disable=invalid-name -from datetime import datetime -import pytz +from datetime import UTC, datetime class Metrics: @@ -56,7 +55,7 @@ def reset(self) -> None: def now(self) -> datetime: """Returns the localized datetime""" - return pytz.utc.localize(datetime.utcnow()) + return datetime.now(UTC) def getMetricList(self) -> dict[str, any]: """Return metric list as dict"""