# HG changeset patch # User Christian Ebert # Date 1265393287 0 # Node ID 5684a76da2639a513383e0f870272fb1ae5daf5d # Parent b94f7991f06b846bc26859be9c9a83247fc1756a (0.9.2compat) fix utcdate filter diff -r b94f7991f06b -r 5684a76da263 hgkw/keyword.py --- a/hgkw/keyword.py Thu Dec 24 11:02:48 2009 +0000 +++ b/hgkw/keyword.py Fri Feb 05 18:08:07 2010 +0000 @@ -92,7 +92,7 @@ from mercurial import localrepo, patch, revlog, templater, util from mercurial.node import nullid, hex from mercurial.i18n import gettext as _ -import getopt, os, re, shutil, tempfile +import getopt, os, re, shutil, tempfile, time commands.optionalrepo += ' kwdemo' @@ -107,11 +107,8 @@ ' transplant') # provide cvs-like UTC date filter -def utcdate(date): - try: - return util.datestr(date, '%Y/%m/%d %H:%M:%S', False) - except TypeError: - return util.datestr(date, '%Y/%m/%d %H:%M:%S') +utcdate = lambda x: time.strftime('%Y/%m/%d %H:%M:%S', + time.gmtime(float(x[0]))) def textsafe(s): '''Safe version of util.binary with reversed logic.