1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-11-03 04:17:21 -05:00

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

View File

@ -412,7 +412,7 @@ def _convert(field_type, value):
return value return value
if field_type == datetime: 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: if field_type == date:
return date.fromisoformat(value) return date.fromisoformat(value)