changeset 1343:8afe9dc4547d

fix xml sitemap timestamps
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 24 Apr 2012 23:11:47 +0200
parents ea982b344156
children 59220d491dc3
files MoinMoin/apps/misc/views.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/misc/views.py	Tue Apr 24 22:37:14 2012 +0200
+++ b/MoinMoin/apps/misc/views.py	Tue Apr 24 23:11:47 2012 +0200
@@ -7,6 +7,7 @@
     Misc. stuff that doesn't fit into another view category.
 """
 
+import time
 
 from flask import Response
 from flask import current_app as app
@@ -25,8 +26,9 @@
     """
     Google (and others) XML sitemap
     """
-    def format_timestamp(dt):
-        return dt.strftime("%Y-%m-%dT%H:%M:%S+00:00")
+    def format_timestamp(t):
+        tm = time.gmtime(t)
+        return time.strftime("%Y-%m-%dT%H:%M:%S%z", tm)
 
     sitemap = []
     for rev in flaskg.storage.documents(wikiname=app.cfg.interwikiname):