show git log timestamps in ISO format in user's timezone?

后端 未结 2 1661
南方客
南方客 2021-02-15 16:41

With --date=local git log shows dates in my (user\'s) timezone:

$ git log  --date=local -3 --pretty=tformat:\'%cd %h\' --abbrev-commit          


        
2条回答
  •  长发绾君心
    2021-02-15 16:43

    It does not seem to be possible to display %ci (ISO time format) converted to the local user's timezone; it always displays in the committer's timezone. You could use %ct and parse the output and reformat it with a utility like date or some other script, or use %cd.

提交回复
热议问题