如何让hg日志在我的时区中显示提交时间戳 [英] How to have hg log show commit timestamps in my timezone
本文介绍了如何让hg日志在我的时区中显示提交时间戳的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hg log
默认显示提交时区中的提交时间戳.是否可以使其显示特定时区中的时间戳?
hg log
by default shows the commit timestamp in the timezone it was committed in. Is it possible to make it show the timestamp in a particular timezone?
理想情况下,解决方案不需要任何外部工具.
Ideally a solution wouldn't require any external tools.
推荐答案
hg log --template "{date|localdate|rfc822date}\n"
因此,您需要获取日期,将其转换为本地日期,然后根据rfc822进行格式化
So you take the date, convert it to local and format according to rfc822
这篇关于如何让hg日志在我的时区中显示提交时间戳的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文