hgext/churn.py
changeset 40240 6f3e733848ae
parent 38401 5c0f06a8b497
child 40241 81e4f039a0cd
equal deleted inserted replaced
40239:379dd054614b 40240:6f3e733848ae
    50     opts = pycompat.byteskwargs(opts)
    50     opts = pycompat.byteskwargs(opts)
    51     if opts.get('dateformat'):
    51     if opts.get('dateformat'):
    52         def getkey(ctx):
    52         def getkey(ctx):
    53             t, tz = ctx.date()
    53             t, tz = ctx.date()
    54             date = datetime.datetime(*time.gmtime(float(t) - tz)[:6])
    54             date = datetime.datetime(*time.gmtime(float(t) - tz)[:6])
    55             return date.strftime(encoding.strfromlocal(opts['dateformat']))
    55             return encoding.strtolocal(
       
    56                 date.strftime(encoding.strfromlocal(opts['dateformat'])))
    56     else:
    57     else:
    57         tmpl = opts.get('oldtemplate') or opts.get('template')
    58         tmpl = opts.get('oldtemplate') or opts.get('template')
    58         tmpl = logcmdutil.maketemplater(ui, repo, tmpl)
    59         tmpl = logcmdutil.maketemplater(ui, repo, tmpl)
    59         def getkey(ctx):
    60         def getkey(ctx):
    60             ui.pushbuffer()
    61             ui.pushbuffer()