{"thread":{"id":"57887","subject":"Date in git-commit output inconsistent with log.date format","startedAt":"2022-05-16T12:42:21Z","lastAt":"2022-05-16T16:14:46Z","messageCount":2,"participants":["Damien Regad","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"455316","messageId":"CA+zp4VNWMxZ2ieS8KP2-uUu90AMmdzyR31VGkf78KdG4jY4eug@mail.gmail.com","threadId":"57887","inReplyTo":null,"subject":"Date in git-commit output inconsistent with log.date format","fromName":"Damien Regad","fromEmail":"dregad@mantisbt.org","sentAt":"2022-05-16T12:42:05Z","receivedAt":"2022-05-16T12:42:21Z","isPatch":false,"sender":{"key":"dregad@mantisbt.org","avatar":"https://avatars.githubusercontent.com/u/449891?v=4"},"body":"I was amending a commit message, and noticed the date in the output is\nprinted in 'default' format, as shown below:\n\n$ git commit --amend --no-edit\n[x bf63ada92] Test commit\n Date: Mon May 16 14:25:57 2022 +0200\n 1 file changed, 32 insertions(+)\n create mode 100644 test.txt\n\nSince I have set log.date=iso, I was expecting the date to use the\nformat defined in that configuration. Is it intentional that the\ndefault format is applied instead ?\n\nThanks\nDamien\n\n\nPS: Apologies if this has been asked before, I did search the list\narchive without finding anything relevant.\n"},{"id":"455326","messageId":"xmqqmtfh4fpt.fsf@gitster.g","threadId":"57887","inReplyTo":"CA+zp4VNWMxZ2ieS8KP2-uUu90AMmdzyR31VGkf78KdG4jY4eug@mail.gmail.com","subject":"Re: Date in git-commit output inconsistent with log.date format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2022-05-16T16:14:38Z","receivedAt":"2022-05-16T16:14:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Damien Regad <dregad@mantisbt.org> writes:\n\n> I was amending a commit message, and noticed the date in the output is\n> printed in 'default' format, as shown below:\n>\n> $ git commit --amend --no-edit\n> [x bf63ada92] Test commit\n>  Date: Mon May 16 14:25:57 2022 +0200\n>  1 file changed, 32 insertions(+)\n>  create mode 100644 test.txt\n>\n> Since I have set log.date=iso, I was expecting the date to use the\n> Is it intentional that the\n> default format is applied instead ?\n\nYes.\n\nThat output is from \"git commit\", and is not from any command in the\n\"git log\" family.  Besides, it way predates the introduction of\nlog.date configuration variable.\n\nThis could be a XY problem.  Can you tell us why you care?  What\nmotivates you to see that date (and optionally Author when the\nauthor is different from the current user) output in a specific\nformat---it is meant for human consumption so \"I run 'git commit' in\na script and scrape its output\" would not be it.\n\nThanks.\n"}]}