git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug] git log - reports wrong date and time
@ 2019-04-01 22:31 Chanseok Oh
  2019-04-02  0:38 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Chanseok Oh @ 2019-04-01 22:31 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-02 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-01 22:31 [Bug] git log - reports wrong date and time Chanseok Oh
2019-04-02  0:38 ` Junio C Hamano
2019-04-02 14:59   ` Chanseok Oh

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