public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Michael Heerdegen <michael_heerdegen@web•de>
To: git@vger•kernel.org
Subject: Re: [Bug] git-log prints wrong unixtime with --date=format:%s
Date: Tue, 17 May 2016 19:25:31 +0200	[thread overview]
Message-ID: <8760ucoaus.fsf@web.de> (raw)
In-Reply-To: 87vb2d37ea.fsf@web.de

Michael Heerdegen <michael_heerdegen@web•de> writes:

> the command
>
>    git log --pretty=format:%ad --date=format:%s
>
> displays wrong unixtime values; apparently how much the printed value
> differs from the expected value depends on the system's time zone and
> whether daylight savings time is enabled or not.

Two more comments:

  - --date=raw seems to work correctly (though the doc tells it would
    also use "%s").

  - When specifying versions like @{N hours}, the result seems to differ
    (by one hour?) from what I expect, too.


Thanks,

Michael.

  reply	other threads:[~2016-05-17 17:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16 23:33 [Bug] git-log prints wrong unixtime with --date=format:%s Michael Heerdegen
2016-05-17 17:25 ` Michael Heerdegen [this message]
2016-05-18  0:40   ` Jeff King
2016-05-18  0:58     ` Jeff King
2016-05-18 16:21       ` Junio C Hamano
2016-05-18 16:44         ` Randall S. Becker
2016-05-18 17:51           ` Jeff King
2016-05-18 17:49         ` Jeff King
2016-05-18 23:05           ` Michael Heerdegen
2016-05-19  1:54             ` Jeff King
2016-05-19 15:41               ` Michael Heerdegen
2016-05-18 22:57     ` Michael Heerdegen

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=8760ucoaus.fsf@web.de \
    --to=michael_heerdegen@web$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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