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
Junio C Hamano <gitster@pobox.com>
Date
Jul 27, 2016, 20:11 UTC
Message-ID
<xmqqtwfavo21.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160727195703.GA8141@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
> The second option you've shown here is much better, and I think this is
> worth fixing (and it should be in a new patch, and can go on top of the
> others).
>
> I'm not sure if it's worth calling out more clearly what the timezone
> means, since the epoch seconds are in UTC, as you noted here. The
> follow-on sentence explains what "-local" does, but not what it means in
> the non-local variant.
Hmm, that is another thing we can incrementally improve, I guess.

Here is 7/6 I've tentatively queued. Note that I minimized the reflowing of the paragraph you did in 5/6 so the patch may not apply cleanly to your tree.

-- >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.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/rev-list-options.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
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")`).
 Note that the `-local` option does not affect the seconds-since-epoch
 value (which is always measured in UTC), but does switch the accompanying
 timezone value.
-- 
2.9.2-654-g4c312ab
Previous: Jeff KingNext: Jeff King
Message 13 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.