This feeds the format directly to strftime.
Besides being a little more flexible, the main advantage is that your system
strftime may know more about your locale's preferred format (e.g., how to spell the days of the week).
--date=format:... feeds the format ... to your system strftime.
Use --date=format:%c to show the date in your system locale's preferred format.
See the strftime manual for a complete list of format placeholders.
The --date option (introduced in commit 02b47cd in Dec. 2009, for git1.7.0) uses the same format than for GIT_AUTHOR_DATE, with date formats tested in commit 96b2d4f:
The only thing that works is reading the source under date.c and trying it out.
Points not mentioned by VonC on 2.3.0:
digits only are parsed depending on the number of digits:
2 digits: 19YY , for YY >= 73, current month, day and time. Errors or current date otherwise.
4 digits: YYYY , for YYYY >= 1973, <= 2099
> 8 digits up to some small limit (TODO which?): UNIX time (seconds since 1970)
@<digits> +0000: UNIX time.
This seems like the best way to enter UNIX times directly.
2**64 - 2 (TODO why not -1 ?) was the maximum value that does not lead to a commit error. The stamp is stored in a C long.
git log shows very large values (somewhere around 2^55 TODO where?) as 1970, even though git cat-file -p HEAD shows that the right number was stored, so it seems like a limitation of the date conversion.
When there's no ambiguity, namely <day> is greater than 12, the order of <month><day> doesn't matter, and the separator could be any of '/', '-', or '.'.
Otherwise, use '.' as separator for <day>.<month>, and '/' or '-' for <month>-<day>.
So "1.7" would be treated as "July 1st", and "1/7" would be "January 7th".