git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Wrong time in git-log when using right/ timezone

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2007, 20:57 UTC
Message-ID
<7vk5sx77me.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<alpine.LFD.0.999.0707180948080.27353@woody.linux-foundation.org>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 24 quoted lines
> Wow. I just tried:
>
> 	git show --raw --date=local
>
> with TZ=CET and TZ=right/Europe/Berlin respectively.
> ...
> ie apparently Berlin is in a timezone of its own that is roughly one 
> minute and 23 seconds away from CET.
>
> What the *heck*?
>
> I really don't think this is git that is confused: I get the exact same 
> thing with "date" too:
>
> 	[torvalds@woody git]$ TZ=right/Europe/Berlin date ; TZ=CET date
> 	Wed Jul 18 18:52:25 CEST 2007
> 	Wed Jul 18 18:52:48 CEST 2007
>
> so it really *is* the tzdata that says that Berlin is not +0200, and it's 
> not even +0159, it's something really strange with fractional minutes away 
> from UTC.
>
> What can I say? "Those wacky Germans - they have a wonderful sense of 
> humor"?
No, I do not think the wackiness is from Germans.

Using right/ perhaps without realizing the differences between TZ=right/Europe/Berlin and TZ=Europe/Berlin is probably the source of confusion.

I do not offhand know what role "leap second adjustment" should play in the context of converting from Unix time we store in git commit objects to human readable role. As far as I understand, the returned timestamp from time(2), which we record in commit objects, is already "leap second adjusted".

Previous: Alex RiesenNext: Jan Hudec
Message 7 of 8 in “Wrong time in git-log when using right/ timezone”
  1. Peter HartlichJul 18, 2007
  2. Peter HartlichJul 18, 2007
  3. Linus TorvaldsJul 18, 2007
  4. Julian PhillipsJul 18, 2007
  5. Linus TorvaldsJul 18, 2007
  6. Alex RiesenJul 18, 2007
  7. Junio C HamanoJul 18, 2007
  8. Jan HudecJul 25, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.