--- 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.