git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jakub Narębski" <jnareb@gmail.com>,
	git@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>
Subject: Re: [PATCH v3 5/6] date: document and test "raw-local" mode
Date: Wed, 27 Jul 2016 16:16:52 -0400	[thread overview]
Message-ID: <20160727201651.GA26984@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqtwfavo21.fsf@gitster.mtv.corp.google.com>

On Wed, Jul 27, 2016 at 01:11:34PM -0700, Junio C Hamano wrote:

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

> 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

  reply	other threads:[~2016-07-27 20:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-22 19:51 [PATCH v2 0/6] reflog docs and date-formatting Jeff King
2016-07-22 19:51 ` [PATCH v2 1/6] doc/rev-list-options: clarify "commit@{Nth}" for "-g" option Jeff King
2016-07-22 19:51 ` [PATCH v2 2/6] doc/rev-list-options: explain "-g" output formats Jeff King
2016-07-22 19:51 ` [PATCH v2 3/6] doc/pretty-formats: describe index/time formats for %gd Jeff King
2016-07-22 19:51 ` [PATCH v2 4/6] doc/pretty-formats: explain shortening of %gd Jeff King
2016-07-22 19:51 ` [PATCH v2 5/6] date: document and test "raw-local" mode Jeff King
2016-07-23 10:15   ` Jakub Narębski
2016-07-26 18:47     ` Jeff King
2016-07-27 12:35       ` Jakub Narębski
2016-07-27 13:44         ` [PATCH v3 " Jeff King
2016-07-27 19:49           ` Junio C Hamano
2016-07-27 19:57             ` Jeff King
2016-07-27 20:11               ` Junio C Hamano
2016-07-27 20:16                 ` Jeff King [this message]
2016-07-27 20:17                   ` Junio C Hamano
2016-07-22 19:51 ` [PATCH v2 6/6] date: add "unix" format Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160727201651.GA26984@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).