summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2011-05-12 23:21:07 +0200
committerLeif Johansson <leifj@sunet.se>2011-05-12 23:21:07 +0200
commitc73412cf74830256002790493556c3f842d013f3 (patch)
treecc09be1ebe42e23242e20643bf38aa330f8cf4c8
parent525072bfd8c3781f2ced07f993caf94282995108 (diff)
fix dates
-rw-r--r--src/meetingtools/apps/room/views.py3
-rw-r--r--src/templates/apps/room/atom.xml2
-rw-r--r--src/templates/apps/room/rss2.xml2
3 files changed, 4 insertions, 3 deletions
diff --git a/src/meetingtools/apps/room/views.py b/src/meetingtools/apps/room/views.py
index c5fc8b8..86b08ee 100644
--- a/src/meetingtools/apps/room/views.py
+++ b/src/meetingtools/apps/room/views.py
@@ -407,13 +407,14 @@ def list_by_tag(request,tn):
rooms = TaggedItem.objects.get_by_model(Room, tags)
title = 'Rooms tagged with %s' % " and ".join(tags)
now = rfc3339_date(datetime.now())
+ now822 = timeAsrfc822( datetime.now() )
return respond_to(request,
{'text/html':'apps/room/list.html',
'application/json': json_response([_room2dict(room) for room in rooms]),
'application/atom+xml': 'apps/room/atom.xml',
'application/rss+xml': 'apps/room/rss2.xml',
'text/rss': 'apps/room/rss2.xml'},
- {'title':title,'description':title ,'edit':False,'baseurl': BASE_URL,'date': now,'tags': tn,'rooms':[_room2dict(room) for room in rooms.all()]})
+ {'title':title,'description':title ,'edit':False,'baseurl': BASE_URL,'rfc3339_date': now,'rfc822_date': now822,'tags': tn,'rooms':[_room2dict(room) for room in rooms.all()]})
def _can_tag(request,tag):
if tag in ('selfcleaning','public','private'):
diff --git a/src/templates/apps/room/atom.xml b/src/templates/apps/room/atom.xml
index 15b329c..94dee98 100644
--- a/src/templates/apps/room/atom.xml
+++ b/src/templates/apps/room/atom.xml
@@ -2,7 +2,7 @@
{% load prefix %}
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{title}}</title>
- <updated>{{date}}</updated>
+ <updated>{{rfc3339_date}}</updated>
<link rel="self" href="{{baseurl}}/room/+{{tags}}.atom"/>
<link href="{{baseurl}}/room/+{{tags}}"/>
{% if rooms %}
diff --git a/src/templates/apps/room/rss2.xml b/src/templates/apps/room/rss2.xml
index 5a30d58..597f472 100644
--- a/src/templates/apps/room/rss2.xml
+++ b/src/templates/apps/room/rss2.xml
@@ -8,7 +8,7 @@
<title>{{title}}</title>
<description>{{description}}</description>
<!-- {{tags}} -->
- <lastBuildDate>{{date}}</lastBuildDate>
+ <lastBuildDate>{{rfc822_date}}</lastBuildDate>
<link>{{baseurl}}/room/+{{tags}}</link>
<atom:link rel="self" href="{{baseurl}}/room/+{{tags}}.rss"/>
{% if rooms %}