From 086611909ea0e70a12bcdec9ff2c0a82d1236abd Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Sun, 24 Nov 2024 17:13:05 +0100 Subject: [PATCH] Convert back to UTC ASAP --- obsidian_import/obsidian.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/obsidian_import/obsidian.py b/obsidian_import/obsidian.py index 9450ad6..0b765fa 100644 --- a/obsidian_import/obsidian.py +++ b/obsidian_import/obsidian.py @@ -305,7 +305,7 @@ def parse_event_string(event_str: str, date: datetime.date, timezone: ZoneInfo) logger.info('Could not parse format: %s', event_str) return Event(None, None, None, None, event_str) - start = datetime.datetime.combine(date, start_time, timezone) - end = datetime.datetime.combine(date, end_time, timezone) + start = datetime.datetime.combine(date, start_time, timezone).astimezone(datetime.UTC) + end = datetime.datetime.combine(date, end_time, timezone).astimezone(datetime.UTC) return Event(start, end, m.group(3), m.group(4), m.group(5))