git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Chanseok Oh <chanseok@google.com>
To: git@vger.kernel.org
Subject: [Bug] git log - reports wrong date and time
Date: Mon, 1 Apr 2019 18:31:10 -0400	[thread overview]
Message-ID: <CAP5K-1YJN9jt_6yEbLs=ET6M2tRLMMoio65GJMsJy69Y+LCn1g@mail.gmail.com> (raw)

Hello,

I'm using the latest version.

    $ git version
    git version 2.21.0.392.gf8f6787159e-goog

WORKS: the following prints out the date and time in my local timezone.

    $ git log '--date=format-local:%Y%m%d %H%M%S %z (%Z)' --format=%cd -n1
    20190401 170250 -0400 (EDT)

WORKS: "TZ=UTC" is respected. It prints time in UTC.

    $ TZ=UTC git log '--date=format-local:%Y%m%d %H%M%S %z (%Z)'
--format=%cd -n1
    20190401 210250 +0000 (UTC)

BROKEN: anything other than UTC reports wrong date.

    $ TZ=KST git log '--date=format-local:%Y%m%d %H%M%S %z (%Z)'
--format=%cd -n1
    20190401 210250 +0000 (KST)

The time is in UTC. Worse, %Z respects TZ=KST, which is in conflict with %z.

The symptom is same with "--date=local". It respects TZ=UTC but
nothing other than TZ=UTC.

Regards,
Chanseok

             reply	other threads:[~2019-04-01 22:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 22:31 Chanseok Oh [this message]
2019-04-02  0:38 ` [Bug] git log - reports wrong date and time Junio C Hamano
2019-04-02 14:59   ` Chanseok Oh

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to='CAP5K-1YJN9jt_6yEbLs=ET6M2tRLMMoio65GJMsJy69Y+LCn1g@mail.gmail.com' \
    --to=chanseok@google.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).