+00:00" is a valid ISO 8601 timezone designation for UTC. But this seems to have changed to Z in latest fastapi=0.100.0. Is there a way to change this back?
In fastapi==0.95.0 we created our ISO date like this and returned it as json:
expiry_date = (device.expires_at.replace(tzinfo=pytz.UTC)).isoformat()
return {
"expires_at": expiry_date
}
The unit test was expecting a dateformat like this:
2023-07-16T06:26:30.769459+00:00
assert response.json()["expires_at"] == date.strftime(
"%Y-%m-%dT%H:%M:%S.%f+00:00"
)
But now with fastapi==0.100.0 the format has changed, which fails the unit test.
2023-07-16T06:26:30.769459Z
Is there a way to change this back to +00:00
?