blob: 99c455f51c044fda016fc2f41b50ab61baac6718 [file] [log] [blame]
Junio C Hamanoae05fee2010-01-08 07:39:461DATE FORMATS
2------------
3
Junio C Hamanoa372d5b2021-02-26 01:34:374The `GIT_AUTHOR_DATE` and `GIT_COMMITTER_DATE` environment variables
Junio C Hamanoae05fee2010-01-08 07:39:465support the following date formats:
6
7Git internal format::
Junio C Hamanoe3acfb82013-11-12 23:22:578It is `<unix timestamp> <time zone offset>`, where `<unix
Junio C Hamanoae05fee2010-01-08 07:39:469timestamp>` is the number of seconds since the UNIX epoch.
Junio C Hamanoe3acfb82013-11-12 23:22:5710`<time zone offset>` is a positive or negative offset from UTC.
Junio C Hamano52b1cfb2016-12-20 00:18:3611For example CET (which is 1 hour ahead of UTC) is `+0100`.
Junio C Hamanoae05fee2010-01-08 07:39:4612
13RFC 2822::
14The standard email format as described by RFC 2822, for example
15`Thu, 07 Apr 2005 22:13:13 +0200`.
16
17ISO 8601::
18Time and date specified by the ISO 8601 standard, for example
19`2005-04-07T22:13:13`. The parser accepts a space instead of the
Junio C Hamanodd4c1782020-05-05 22:34:5420`T` character as well. Fractional parts of a second will be ignored,
21for example `2005-04-07T22:13:13.019` will be treated as
Junio C Hamano0beab6c2020-05-26 18:32:2522`2005-04-07T22:13:13`.
Junio C Hamanoae05fee2010-01-08 07:39:4623+
24NOTE: In addition, the date part is accepted in the following formats:
25`YYYY.MM.DD`, `MM/DD/YYYY` and `DD.MM.YYYY`.
Junio C Hamanoa372d5b2021-02-26 01:34:3726
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[]