list_events() returns timezone aware data for the openDate field, e.g. as indicated by the 'Z' for the UTC time zone in the response below:
>>> events=trading.betting.list_events()
>>> events[0].json()
'{"event":{"id":"29043131","name":"Aguada v Bigua","countryCode":"UY","timezone":"GMT","openDate":"2018-12-12T00:15:00.000Z"},"marketCount":3}'
However, following conversion to a datetime.datetime object the timezone information is lost.
>>> events[0].event.open_date
datetime.datetime(2018, 12, 12, 0, 15)
Conversion from JSON to datetime.datetime should not lose the timezone info.
list_events()returns timezone aware data for the openDate field, e.g. as indicated by the 'Z' for the UTC time zone in the response below:However, following conversion to a
datetime.datetimeobject the timezone information is lost.Conversion from JSON to
datetime.datetimeshould not lose the timezone info.