git日志接受日期参数的日期格式是什么? [英] What date formats does git log accept for date parameters?

查看:143
本文介绍了git日志接受日期参数的日期格式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于,在之前, - 之前, git log 接受哪些日期格式?之后, - 自 - 直到选项(与 - 日期选项)?



我有兴趣在当地时区获取日期范围的日志。

解决方案

根据文档,这些格式被接受:


  • Git内部格式::
    它是< unix timestamp> ; <时区偏移> ,其中< unix
    时间戳>
    是自UNIX纪元以来的秒数。
    <时区偏移> 与UTC的偏移或负偏移。
    例如CET(即UTC前2小时)是 +0200


  • RFC 2822 ::
    RFC 2822描述的标准电子邮件格式,例如
    Thu,2005年4月7日22:13:13 +0200 。 ISO 8601 ::
    ISO 8601标准规定的时间和日期,例如
    2005- 04-07T22:13:13 。解析器接受空间而不是
    T 字符。


  • +
    注意:另外,日期部分以下列格式被接受:
    YYYY.MM.DD MM / DD / YYYY DD.MM.YYYY



What date formats does git log accept for the --before, --after, --since, and --until options (as opposed to the --date option)?

I'm interested in getting logs for date ranges in the local time zone.

解决方案

According to the documentation these formats are accepted:

  • Git internal format:: It is <unix timestamp> <time zone offset>, where <unix timestamp> is the number of seconds since the UNIX epoch. <time zone offset> is a positive or negative offset from UTC. For example CET (which is 2 hours ahead UTC) is +0200.

  • RFC 2822:: The standard email format as described by RFC 2822, for example Thu, 07 Apr 2005 22:13:13 +0200.

  • ISO 8601:: Time and date specified by the ISO 8601 standard, for example 2005-04-07T22:13:13. The parser accepts a space instead of the T character as well.

  • + NOTE: In addition, the date part is accepted in the following formats: YYYY.MM.DD, MM/DD/YYYY and DD.MM.YYYY.

这篇关于git日志接受日期参数的日期格式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆