Commit 2dd4c172 authored by mit's avatar mit

deal with timezones of imported icalendar/webcal

parent 9e012fd8
......@@ -331,8 +331,10 @@ def Agenda2Cul(agenda, categories, default_tag, caldav=None):
if type(sdate) ==
sdate = datetime.datetime.combine(sdate, datetime.time(0))
dur = 24*60*60
# remove the potential timezone
sdate = sdate.replace(tzinfo=None)
# check the potential timezone and put to local
if sdate.tzinfo:
sdate = sdate.astimezone()
sdate = sdate.replace(tzinfo=None)
if caldav:
if caldav == "webcal":
uid = None
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment