py3: call strftime() with native str type
Since strftime() may contain non-ascii character if locale set, we use
strfrom/tolocal().
Now "hg tip" works.
--- a/mercurial/util.py Mon Mar 13 09:12:56 2017 -0700
+++ b/mercurial/util.py Mon Mar 13 09:19:07 2017 -0700
@@ -1792,7 +1792,7 @@
# because they use the gmtime() system call which is buggy on Windows
# for negative values.
t = datetime.datetime(1970, 1, 1) + datetime.timedelta(seconds=d)
- s = t.strftime(format)
+ s = encoding.strtolocal(t.strftime(encoding.strfromlocal(format)))
return s
def shortdate(date=None):