Web lists-archives.com

[Bug] git log - reports wrong date and time


I'm using the latest version.

    $ git version
    git version

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.