Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 1 | DATE FORMATS |
| 2 | ------------ |
| 3 | |
Junio C Hamano | 042f214 | 2016-06-27 18:05:05 | [diff] [blame^] | 4 | The `GIT_AUTHOR_DATE`, `GIT_COMMITTER_DATE` environment variables |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 5 | ifdef::git-commit[] |
| 6 | and the `--date` option |
| 7 | endif::git-commit[] |
| 8 | support the following date formats: |
| 9 | |
| 10 | Git internal format:: |
Junio C Hamano | e3acfb8 | 2013-11-12 23:22:57 | [diff] [blame] | 11 | It is `<unix timestamp> <time zone offset>`, where `<unix |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 12 | timestamp>` is the number of seconds since the UNIX epoch. |
Junio C Hamano | e3acfb8 | 2013-11-12 23:22:57 | [diff] [blame] | 13 | `<time zone offset>` is a positive or negative offset from UTC. |
Junio C Hamano | ae05fee | 2010-01-08 07:39:46 | [diff] [blame] | 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`. |