Skip to content

Commit

Permalink
fixed syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
fredriklj committed Dec 18, 2024
1 parent 6635967 commit dd5ff85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyporscheconnectapi/vehicle.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Models the state of a Porsche Connect vehicle."""
from __future__ import annotations

import datetime
import json # only for formatting debug output
import logging
import re
import uuid
from datetime import datetime

from pyporscheconnectapi.connection import Connection
from pyporscheconnectapi.exceptions import PorscheExceptionError
Expand Down Expand Up @@ -222,7 +222,7 @@ def location_updated_at(self) -> datetime:
"""Return time stamp of latest location update."""
datetime_str = self.data.get("GPS_LOCATION", {}).get("lastModified")
if datetime_str:
return datetime.strptime(datetime_str, "%Y-%m-%dT%H:%M:%SZ").astimezone(datetime.timezone.utc)
return datetime.datetime.strptime(datetime_str, "%Y-%m-%dT%H:%M:%SZ").astimezone(datetime.timezone.utc)
return None

@property
Expand Down

0 comments on commit dd5ff85

Please sign in to comment.