list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Inconsistency between git-log documentation and behavior regarding default date format.
       [not found] <>
@ 2023-01-24 15:09 ` Rafael Dulfer
  0 siblings, 0 replies; only message in thread
From: Rafael Dulfer @ 2023-01-24 15:09 UTC (permalink / raw)
  To: git

The Git documentation 
<> states 
that if no date format is given (or --date=default is given), the date 
format is similar to rfc2822 except of a few exceptions, of which those 
listed are:

   * There is no comma after the day-of-week
   * The time zone is omitted when the local time zone is used

However, if we were to compare the two date formats, you can see another 

git log --default  ->  Tue Jan 24 11:03:47 2023 +0100
git log --rfc          ->  Tue, 24 Jan 2023 11:03:47 +0100

With the default, the month and day-of-month are switched around. From 
my own quick investigation, this behavior occurs because of the 
statement found at date.c#L266 
wherein the month is inserted before the day-of-month. I am unsure which 
behavior is exactly intended and whether this discrepancy was known, but 
it would probably be a good idea to have a note of it in the documentation.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-24 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
2023-01-24 15:09 ` Inconsistency between git-log documentation and behavior regarding default date format Rafael Dulfer

Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).