ICS: fix timezone

This commit is contained in:
boyska 2018-06-24 01:00:56 +02:00
parent 96b06a686b
commit 3a90f6991a

View file

@ -31,6 +31,7 @@ except ImportError:
else:
ICS_ENABLED = True
import unidecode
import dateutil
pelican = None # This will be set during register()
@ -152,6 +153,8 @@ def get_talk_data(talkname):
timeparts = [int(p) for p in timeparts]
data['time'] = datetime.datetime.combine(
data['day'], datetime.time(*timeparts))
data['time'] = data['time'].replace(
tzinfo=dateutil.tz.gettz('Europe/Rome'))
else:
logging.error("Talk <%s> has malformed `time`", talkname)
data['id'] = talkname