From 05c5bcb7231235fdbf5bcf91f9d0b0f27e07f0d1 Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Sat, 18 Nov 2023 10:25:52 +0100 Subject: [PATCH] Convert datetimes to local timezone by default --- toot/entities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toot/entities.py b/toot/entities.py index d5588fe..b98aa7d 100644 --- a/toot/entities.py +++ b/toot/entities.py @@ -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)