fix uid ical again

This commit is contained in:
fram3d 2024-02-08 17:21:52 +01:00
parent 4d4fd6d4d3
commit 45eb5e6b21
Signed by: fram3d
GPG Key ID: 938920E709EEA32A

View File

@ -56,11 +56,12 @@ def build_ical(events: list[dict]) -> str:
title = event["title"]
location = event["location"]
date = event["date"]
time = event["time"]
uid = str(date.month).zfill(2) + str(date.day).zfill(2) + time[:2]
date = str(date.year) + str(date.month).zfill(2) + str(date.day).zfill(2)
created = str(today.year) + str(today.month).zfill(2) + str(today.day).zfill(2) + "T" + str(today.hour).zfill(2) + str(today.minute).zfill(2) + str(today.second).zfill(2) + "Z"
time = event["time"]
date = date + "T" + time.replace(":", "") + "00"
uid = str(date.month).zfill(2) + str(date.day).zfill(2) + time[:2]
event_template = ""
with open("template/event.ical", "r") as file: