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

Re: [PATCH v3 5/6] date: document and test "raw-local" mode

From
Jeff King <peff@peff.net>
Date
Jul 27, 2016, 20:16 UTC
Message-ID
<20160727201651.GA26984@sigill.intra.peff.net>
In-Reply-To
<xmqqtwfavo21.fsf@gitster.mtv.corp.google.com>
On Wed, Jul 27, 2016 at 01:11:34PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> -- >8 --
> Subject: [PATCH] date: clarify --date=raw description
> 
> "... in the internal raw Git format `%s %z` format." was clunky in
> repeating "format" twice, and would not have helped those who do not
> know that these are strftime(3) conversion specifiers.
> 
> Explain them with words, and demote the mention of `%s %z` to a
> hint to help those who know them.
Good explanation.
Show 12 quoted lines
> diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
> index fd86ed1..d55e3ae 100644
> --- a/Documentation/rev-list-options.txt
> +++ b/Documentation/rev-list-options.txt
> @@ -746,7 +746,9 @@ format, often found in email messages.
>  +
>  `--date=short` shows only the date, but not the time, in `YYYY-MM-DD` format.
>  +
> -`--date=raw` shows the date in the internal raw Git format `%s %z` format.
> +`--date=raw` shows the date as seconds since 1970-01-01 00:00:00 UTC,
> +space, timezone as sign and four digits (i.e. as if the timestamp were
> +formatted with `strftime("%s %z")`).
I do find this by itself a little hard to parse. Maybe:
  `--date=raw` shows the date as seconds since the epoch (1970-01-01
  00:00:00 UTC), followed by a space, and then the timezone as an offset
  from UTC (a `+` or `-` with four digits; the first two are hours, and
  the second two are minutes). I.e., as if the timestamp were formatted
  with `strftime("%s %z")`).
-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 16 in “reflog docs and date-formatting”
  1. 0/6 reflog docs and date-formattingJeff King, Jul 22, 2016
  2. 1/6 doc/rev-list-options: clarify "commit@{Nth}" for "-g" optionJeff King, Jul 22, 2016
  3. 2/6 doc/rev-list-options: explain "-g" output formatsJeff King, Jul 22, 2016
  4. 3/6 doc/pretty-formats: describe index/time formats for %gdJeff King, Jul 22, 2016
  5. 4/6 doc/pretty-formats: explain shortening of %gdJeff King, Jul 22, 2016
  6. 5/6 date: document and test "raw-local" modeJeff King, Jul 22, 2016
  7. Jakub NarębskiJul 23, 2016
  8. Jeff KingJul 26, 2016
  9. Jakub NarębskiJul 27, 2016
  10. 5/6 date: document and test "raw-local" modeJeff King, Jul 27, 2016
  11. Junio C HamanoJul 27, 2016
  12. Jeff KingJul 27, 2016
  13. Junio C HamanoJul 27, 2016
  14. Jeff KingJul 27, 2016
  15. Junio C HamanoJul 27, 2016
  16. 6/6 date: add "unix" formatJeff King, Jul 22, 2016

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.