From c73412cf74830256002790493556c3f842d013f3 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Thu, 12 May 2011 23:21:07 +0200 Subject: fix dates --- src/meetingtools/apps/room/views.py | 3 ++- src/templates/apps/room/atom.xml | 2 +- src/templates/apps/room/rss2.xml | 2 +- 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 %} {{title}} - {{date}} + {{rfc3339_date}} {% 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}} {{description}} - {{date}} + {{rfc822_date}} {{baseurl}}/room/+{{tags}} {% if rooms %} -- cgit v1.1