Convert datetimes to local timezone by default

This commit is contained in:
Ivan Habunek 2023-11-18 10:25:52 +01:00
parent d4b6447d0f
commit 05c5bcb723
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
1 changed files with 1 additions and 1 deletions

View File

@ -412,7 +412,7 @@ def _convert(field_type, value):
return value
if field_type == datetime:
return datetime.strptime(value, "%Y-%m-%dT%H:%M:%S.%f%z")
return datetime.strptime(value, "%Y-%m-%dT%H:%M:%S.%f%z").astimezone()
if field_type == date:
return date.fromisoformat(value)