Open richard-keebler opened 9 months ago
Ah, you ran into this issue more or less simultaneously with me. Let say +1 to see if we can find a solution to this issue of "instants" that require timezone information in their string representation. What I did to circumvent for the time being is to add timezone info to the dt object that gets serialized later: dt.replace(tzinfo=datetime.timezone.utc)
Description
When loading a document reference from a json representation that originally came from a
DocumentReference
, it fails on validating the date. Below is a contrived example, but the json we're getting (and loading) is from a fhir repository that delivers and accepts json representations.What I Did
There is a hacky fix here. Just add a
Z
to the end of the date string representation and the problem is solved, i.e.item['date'] + "Z"
. I would expect though, that the string representation would already have that.