From 28cc615c7359481889eba968d5d20442ae515aeb Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 12 2014 11:07:13 +0000 Subject: Enforce the timezone name to be fedocal_ Apparently evolution and google calendar ignore the timezone specified at the top of the file if they follow some sort of standard. For example, if you set a meeting in the timezone 'US/Eastern' the timezone ID is EST and evolution ignores the timezone decalaration at the top of the file to replace it by its own. With this commits the timezone ID becomes fedocal_EST which google calendar and evolution won't know and thus won't ignore. This fixes https://fedorahosted.org/fedocal/ticket/112 --- diff --git a/fedocal/__init__.py b/fedocal/__init__.py index 1adb742..0bf2a78 100644 --- a/fedocal/__init__.py +++ b/fedocal/__init__.py @@ -523,8 +523,11 @@ def ical_out(calendar_name): datetime.datetime.utcnow().strftime('%Y-%m-%d %Hh%M')) ) headers["Content-Disposition"] = "attachment; filename=%s" % filename + output = ical.serialize() + output = output.replace('TZID:', 'TZID:fedocal_') + output = output.replace('TZID=', 'TZID=fedocal_') return flask.Response( - ical.serialize(), + output, mimetype='text/calendar', headers=headers)