diff mercurial/templatefilters.py @ 8591:08c93b07f5ad

templatefilters: add filter to convert date to local date (issue1674) Issue1674 suggests the localdate filter be applied as default to log, but this patch only introduces the filter, not the changed default behaviour.
author Henrik Stuart <hg@hstuart.dk>
date Sun, 24 May 2009 11:41:07 +0200
parents beae42f3d93b
children 3d53820381cb
line wrap: on
line diff
--- a/mercurial/templatefilters.py	Fri May 22 08:56:43 2009 +0200
+++ b/mercurial/templatefilters.py	Sun May 24 11:41:07 2009 +0200
@@ -192,6 +192,7 @@
     "isodatesec": lambda x: util.datestr(x, '%Y-%m-%d %H:%M:%S %1%2'),
     "json": json,
     "jsonescape": jsonescape,
+    "localdate": lambda x: (x[0], util.makedate()[1]),
     "nonempty": nonempty,
     "obfuscate": obfuscate,
     "permissions": permissions,