]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/date-formats.txt
Merge branch 'ug/doc-commit-approxidate'
[thirdparty/git.git] / Documentation / date-formats.txt
CommitLineData
788070a2
MV
1DATE FORMATS
2------------
3
01168a9d 4The `GIT_AUTHOR_DATE` and `GIT_COMMITTER_DATE` environment variables
788070a2
MV
5support the following date formats:
6
7Git internal format::
0ffa154b 8 It is `<unix timestamp> <time zone offset>`, where `<unix
788070a2 9 timestamp>` is the number of seconds since the UNIX epoch.
0ffa154b 10 `<time zone offset>` is a positive or negative offset from UTC.
e2c20be5 11 For example CET (which is 1 hour ahead of UTC) is `+0100`.
788070a2
MV
12
13RFC 2822::
14 The standard email format as described by RFC 2822, for example
15 `Thu, 07 Apr 2005 22:13:13 +0200`.
16
17ISO 8601::
18 Time and date specified by the ISO 8601 standard, for example
19 `2005-04-07T22:13:13`. The parser accepts a space instead of the
b784840c
ĐTCD
20 `T` character as well. Fractional parts of a second will be ignored,
21 for example `2005-04-07T22:13:13.019` will be treated as
833375ff 22 `2005-04-07T22:13:13`.
788070a2
MV
23+
24NOTE: In addition, the date part is accepted in the following formats:
25`YYYY.MM.DD`, `MM/DD/YYYY` and `DD.MM.YYYY`.
01168a9d
JK
26
27ifdef::git-commit[]
28In addition to recognizing all date formats above, the `--date` option
29will also try to make sense of other, more human-centric date formats,
30such as relative dates like "yesterday" or "last Friday at noon".
31endif::git-commit[]