Merge with default stable
authorChristian Ebert <blacktrash@gmx.net>
Fri, 12 Oct 2012 23:46:19 +0200
branchstable
changeset 1142 2a75107bd979
parent 1139 cdabdd17f980 (current diff)
parent 1141 4e2090ed2e72 (diff)
child 1143 38b7bb8f1c85
Merge with default
--- a/hgkw/keyword.py	Wed Sep 26 00:56:27 2012 +0200
+++ b/hgkw/keyword.py	Fri Oct 12 23:46:19 2012 +0200
@@ -117,7 +117,7 @@
 def utcdate(text):
     ''':utcdate: Date. Returns a UTC-date in this format: "2009/08/18 11:00:13".
     '''
-    return util.datestr((text[0], 0), '%Y/%m/%d %H:%M:%S')
+    return util.datestr((util.parsedate(text)[0], 0), '%Y/%m/%d %H:%M:%S')
 # date like in svn's $Date
 def svnisodate(text):
     ''':svnisodate: Date. Returns a date in this format: "2009-08-18 13:00:13
@@ -129,7 +129,7 @@
     ''':svnutcdate: Date. Returns a UTC-date in this format: "2009-08-18
     11:00:13Z".
     '''
-    return util.datestr((text[0], 0), '%Y-%m-%d %H:%M:%SZ')
+    return util.datestr((util.parsedate(text)[0], 0), '%Y-%m-%d %H:%M:%SZ')
 
 templatefilters.filters.update({'utcdate': utcdate,
                                 'svnisodate': svnisodate,