Skip to content

Commit 788070a

Browse files
Miklos Vajnagitster
authored andcommitted
Document date formats accepted by parse_date()
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 02b47cd commit 788070a

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

Documentation/date-formats.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
DATE FORMATS
2+
------------
3+
4+
The GIT_AUTHOR_DATE, GIT_COMMITTER_DATE environment variables
5+
ifdef::git-commit[]
6+
and the `--date` option
7+
endif::git-commit[]
8+
support the following date formats:
9+
10+
Git internal format::
11+
It is `<unix timestamp> <timezone offset>`, where `<unix
12+
timestamp>` is the number of seconds since the UNIX epoch.
13+
`<timezone offset>` is a positive or negative offset from UTC.
14+
For example CET (which is 2 hours ahead UTC) is `+0200`.
15+
16+
RFC 2822::
17+
The standard email format as described by RFC 2822, for example
18+
`Thu, 07 Apr 2005 22:13:13 +0200`.
19+
20+
ISO 8601::
21+
Time and date specified by the ISO 8601 standard, for example
22+
`2005-04-07T22:13:13`. The parser accepts a space instead of the
23+
`T` character as well.
24+
+
25+
NOTE: In addition, the date part is accepted in the following formats:
26+
`YYYY.MM.DD`, `MM/DD/YYYY` and `DD.MM.YYYY`.

Documentation/git-commit-tree.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ A commit comment is read from stdin. If a changelog
7373
entry is not provided via "<" redirection, 'git-commit-tree' will just wait
7474
for one to be entered and terminated with ^D.
7575

76+
include::date-formats.txt[]
7677

7778
Diagnostics
7879
-----------

Documentation/git-commit.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ specified.
220220
these files are also staged for the next commit on top
221221
of what have been staged before.
222222

223+
:git-commit: 1
224+
include::date-formats.txt[]
223225

224226
EXAMPLES
225227
--------

0 commit comments

Comments
 (0)