git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Chanseok Oh <chanseok@google.com>
Cc: git@vger.kernel.org
Subject: Re: [Bug] git log - reports wrong date and time
Date: Tue, 02 Apr 2019 09:38:29 +0900	[thread overview]
Message-ID: <xmqq7ecdutq2.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAP5K-1YJN9jt_6yEbLs=ET6M2tRLMMoio65GJMsJy69Y+LCn1g@mail.gmail.com> (Chanseok Oh's message of "Mon, 1 Apr 2019 18:31:10 -0400")

Chanseok Oh <chanseok@google.com> writes:

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

I think you are probably on a system where timezones can be given
only with a more modern and unambiguous style and not in the
potentially ambiguous abbreviated form.  Here is one experiment to
show what I mean:

    $ TZ=KST date
    Tue Apr  2 00:29:51 KST 2019
    $ TZ=JST date
    Tue Apr  2 00:29:51 JST 2019
    $ TZ=Asia/Tokyo date
    Tue Apr  2 09:29:51 JST 2019

Two points to be learned from the above exercise are:

 - It is not limited to your copy of "git".  Even a system supplied
   command like "date" does not work with "JST" but it can grok
   Asia/Tokyo just fine ("JST" does not necessarily have to be
   "Japan standard time"; it could be Jamaican ;-)).

 - It is not limited to KST (is that Kabul standard time?  Khartoum?
   Kinshasa?).

Perhaps try TZ=Asia/Seoul or something?

  reply	other threads:[~2019-04-02  0:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-01 22:31 [Bug] git log - reports wrong date and time Chanseok Oh
2019-04-02  0:38 ` Junio C Hamano [this message]
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=xmqq7ecdutq2.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=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).