Fix for bug 676

- Legacy-Id: 3181
This commit is contained in:
Adam Roach 2011-06-27 19:59:38 +00:00
parent 95898de070
commit ec1516548a
2 changed files with 5 additions and 12 deletions

View file

@ -339,6 +339,7 @@ def ical_agenda(request, num=None):
q = request.META.get('QUERY_STRING','') or ""
filter = q.lower().split(',');
include = set(filter)
now = datetime.datetime.utcnow()
for slot in timeslots:
for session in slot.sessions():
@ -347,5 +348,6 @@ def ical_agenda(request, num=None):
return HttpResponse(render_to_string("meeting/agenda.ics",
{"filter":set(filter), "timeslots":timeslots, "update":update, "meeting":meeting, "venue":venue, "ads":ads,
"plenaryw_agenda":plenaryw_agenda, "plenaryt_agenda":plenaryt_agenda, },
"plenaryw_agenda":plenaryw_agenda, "plenaryt_agenda":plenaryt_agenda,
"now":now},
RequestContext(request)), mimetype="text/calendar")

View file

@ -1,15 +1,6 @@
{% load humanize %}{% autoescape off %}{% load ietf_filters %}BEGIN:VCALENDAR
VERSION:2.0
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:{% now "T" %}
BEGIN:STANDARD
TZOFFSETFROM:{% now "O" %}
TZOFFSETTO:{% now "O" %}
TZNAME:{% now "T" %}
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
{% if meeting.time_zone %}BEGIN:VTIMEZONE
TZID:{{meeting.city}}
BEGIN:STANDARD
@ -27,7 +18,7 @@ SUMMARY:{{slot.break_info.name}}
CLASS:PUBLIC
DTSTART{% if meeting.time_zone %};TZID="{{meeting.city}}"{%endif%}:{{ slot.meeting_date|date:"Ymd" }}T{{slot.break_info.time_desc|slice:":4"}}00
DTEND{% if meeting.time_zone %};TZID="{{meeting.city}}"{%endif%}:{{ slot.meeting_date|date:"Ymd" }}T{{slot.break_info.time_desc|slice:"5:9"}}00
DTSTAMP;TZID="{% now "T" %}":{% now "Ymd" %}T{% now "Gis" %}
DTSTAMP:{{ now|date:"Ymd" }}T{{ now|date:"His" }}Z
END:VEVENT
{% endif %}{% endifchanged %}{% for session in slot.sessions %}{%for f in filter%}{%ifequal f session.acronym%}BEGIN:VEVENT
UID:ietf-{{meeting.num}}-{{session.acronym}}-{{session.ordinality}}
@ -37,7 +28,7 @@ STATUS:TENTATIVE
CLASS:PUBLIC
DTSTART{% if meeting.time_zone %};TZID="{{meeting.city}}"{%endif%}:{{ slot.meeting_date|date:"Ymd" }}T{{slot.time_desc|slice:":4"}}00
DTEND{% if meeting.time_zone %};TZID="{{meeting.city}}"{%endif%}:{{ slot.meeting_date|date:"Ymd" }}T{{slot.time_desc|slice:"5:9"}}00
DTSTAMP;TZID="{% now "T" %}":{% now "Ymd" %}T{% now "Gis" %}
DTSTAMP:{{ now|date:"Ymd" }}T{{ now|date:"His" }}Z
{% if session.description %}DESCRIPTION:
{{ session.description|escapejs }}
{% endif %}END:VEVENT