Skip to content

Commit b240d22

Browse files
committed
fixed timezone issues with event sync
1 parent ad7b2ac commit b240d22

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cogs/commands/event_sync.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ def api_event_to_dc_args(ev):
9898
"description": description,
9999
"start_time": datetime.strptime(
100100
ev.get("start_time"), "%Y-%m-%dT%H:%M"
101-
).astimezone(timezone("Europe/London")),
102-
"end_time": datetime.strptime(
103-
ev.get("end_time"), "%Y-%m-%dT%H:%M"
104-
).astimezone(timezone("Europe/London")),
101+
).replace(tzinfo=timezone("Europe/London")),
102+
"end_time": datetime.strptime(ev.get("end_time"), "%Y-%m-%dT%H:%M").replace(
103+
tzinfo=timezone("Europe/London")
104+
),
105105
"entity_type": discord.EntityType.external,
106106
"location": ev.get("location"),
107107
}

0 commit comments

Comments
 (0)