git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] Document date formats accepted by parse_date()

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 2, 2009, 22:54 UTC
Message-ID
<7v638p9ebz.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20091203073313.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
> Is there something wrong with 'show'?
>
>   nana.git% ./test-date show '2005-04-07T22:13:13'
>   2005-04-07T22:13:13 -> 40 years ago

Heh, you fooled me, and Peff is right. "test-date show" does not interpret its input any way other than as seconds-since-epoch.

I agree with the "native->internal" part of the suggestion. What see by default in "git show" output is merely the ctime(3) format followed by timezone. I don't mind if we call that "git native", even though I suspect we do _not have to_ invent new word for that.

Also "test-date parse" seems to accept things like these:
    '2009.04.07 20:21:22 -0000'
    '04/07/2009 20:21:22 -0000'
    '07.04.2009 20:21:22 -0000'
Previous: Jeff KingNext: Miklos Vajna
Message 5 of 6 in “builtin-commit: add --date option”
  1. 1/2 builtin-commit: add --date optionMiklos Vajna, Dec 2, 2009
  2. 2/2 Document date formats accepted by parse_date()Miklos Vajna, Dec 2, 2009
  3. Nanako ShiraishiDec 2, 2009
  4. Jeff KingDec 2, 2009
  5. Junio C HamanoDec 2, 2009
  6. 2/2 Document date formats accepted by parse_date()Miklos Vajna, Dec 2, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.