Browse Source

ICS: fix timezone

boyska 6 years ago
parent
commit
3a90f6991a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      plugins/talks.py

+ 3 - 0
plugins/talks.py

@@ -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