git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randall S. Becker" <rsbecker@nexbridge.com>
To: "'Junio C Hamano'" <gitster@pobox.com>, "'Jeff King'" <peff@peff.net>
Cc: "'Michael Heerdegen'" <michael_heerdegen@web.de>, <git@vger.kernel.org>
Subject: RE: [Bug] git-log prints wrong unixtime with --date=format:%s
Date: Wed, 18 May 2016 12:44:43 -0400	[thread overview]
Message-ID: <005a01d1b124$976dceb0$c6496c10$@nexbridge.com> (raw)
In-Reply-To: <xmqqvb2bs5f5.fsf@gitster.mtv.corp.google.com>

On May 18, 2016 12:22 PM Jeff King wrote:
> > I tried a few obvious things, but couldn't make anything work. Setting
> > "timezone" manually seems to do nothing. It's supposed to be set by
> > putting the right thing in $TZ and then calling tzset(). So I tried
> > munging $TZ to something like "+0200". It did have _some_ effect, but
> > I
> 
> Wouldn't that be more like "UTC+0200"?
> 
> In any case, I do not think anybody wants to do tzset() on each and every
> commit while running "git log".  Can we declare "format:<strftime>"
> will always use the local timezone, or something?

Off the wall: Dealing in a dispersed team sharing a server that has a
timezone local for only two of the members, git log messes with me also from
a TZ POV. I would like to suggest a more general solution, like configuring
my own TZ in ~/.gitconfig which would potentially allow an override on the
command line. Would user.timezone be helpful in this situation and if set,
call setenv("TZ=...")? It's not an issue when I'm local, but if I touch a
clone on the server, even I get confused around DST changes in October ;).

Cheers,
Randall

-- Brief whoami: NonStop&UNIX developer since approximately
UNIX(421664400)/NonStop(211288444200000000)
-- In my real life, I talk too much.

  reply	other threads:[~2016-05-18 16:45 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
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 [this message]
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='005a01d1b124$976dceb0$c6496c10$@nexbridge.com' \
    --to=rsbecker@nexbridge.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=michael_heerdegen@web.de \
    --cc=peff@peff.net \
    /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.
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).