Open
Description
I had to modify the code in the deserializer.py on line 216, as the api is returning the datetime in the ISO 8601 format, it seemed to only work when I convert the date into the RFC 3339, so including the Z at the end...
not sure if there is a way in the XERO configuration to specify the date format to be returned in the API?
This is using the Demo account, as I am trying to just get a feel for the API..
if data is not None:
try:
dt = isoparse(data[:16] + 'Z')
except (ValueError, TypeError):
raise ValueError("Invalid datetime value {!r}".format(data[:16] + 'Z'))
if not dt.tzinfo:
# timezone naive datetime from Xero API response always in UTC
dt = dt.replace(tzinfo=tz.UTC)
return dt
Metadata
Metadata
Assignees
Labels
No labels