# HG changeset patch # User Yuya Nishihara # Date 1489421947 25200 # Node ID 756175623f2e2ae6f5b6bf6005afc6d8afe115c0 # Parent 6419cd2430171b93064478503f5f27562bd808c9 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. diff -r 6419cd243017 -r 756175623f2e mercurial/util.py --- 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):