diff --git a/python_weather/forecast.py b/python_weather/forecast.py index 658b65c..5346e39 100644 --- a/python_weather/forecast.py +++ b/python_weather/forecast.py @@ -257,7 +257,10 @@ def __init__(self, json: dict, unit: '_Unit', locale: 'Locale'): self.region = nearest['region'][0]['value'] self.location = nearest['areaName'][0]['value'] self.country = nearest['country'][0]['value'] - self.datetime = datetime.strptime(current['localObsDateTime'], '%Y-%m-%d %I:%M %p') + self.datetime = datetime.combine( + datetime.today(), + datetime.strptime(current['observation_time'], '%I:%M %p').time() + ) try: req = next(filter(lambda x: x['type'] == 'LatLon', json['request']))