Mercurial > hg
diff mercurial/help/templates.txt @ 26128:51f6940d3b4f
templater: add optional timezone argument to localdate()
The keyword extension uses "utcdate" for a different function, so we can't
add new "utcdate" filter or function. Instead, this patch extends "localdate"
to a general timezone converter.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 18 Aug 2015 22:15:46 +0900 |
parents | 35fa7c77c754 |
children | e4609ec959f8 |
line wrap: on
line diff
--- a/mercurial/help/templates.txt Tue Sep 01 19:15:16 2015 +0900 +++ b/mercurial/help/templates.txt Tue Aug 18 22:15:46 2015 +0900 @@ -69,6 +69,10 @@ $ hg log -r 0 --template "{date(date, '%Y')}\n" +- Display date in UTC:: + + $ hg log -r 0 --template "{localdate(date, 'UTC')|date}\n" + - Output the description set to a fill-width of 30:: $ hg log -r 0 --template "{fill(desc, 30)}"