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

Re: Localization: Timestamps get wrong if using different locales

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 5, 2012, 20:47 UTC
Message-ID
<7vmx292hi8.fsf@alter.siamese.dyndns.org>
In-Reply-To
<501E3828.40708@web.de>
Christoph Miebach <christoph.miebach@web.de> writes:
> Running this commands locally (german locale) lead to some wrong dates
> for the patches upstream.
>
> git format-patch -o patches origin

What does "git show -s --pretty=fuller HEAD" give you at this point? This is to check what kind of timestamps are stored in the original commit objects.

And what does "grep '^Date: ' patches/0001-*" show you at this point? This is to see if the problem is at the "format-patch" step.

> git send-email --compose --no-chain-reply-to --to some@address.com
> --suppress-cc=author patches/0001-l10n-Turkish-update.patch

And what does "grep '^Date: '" for the message that is received by recipients show at this step? They cannot be

Show 6 quoted lines
>
>
> The local
> Date: Sat, 4 Aug 2012
> became
>       Wed, 8 Dec 2004

as these two do not even have times and zones. It should read something like

    Date: Sun, 05 Aug 2012 13:39:12 -0700
or something.    

Also "Date" on which message do you see your problem with? The one that is created with --compose? Or the one that was originally produced by format-patch and then sent? Or both?

The timestamps used by git-send-email is obtained by calling time() function of Perl, and is not affected by timezone, and the function format_2822_time() implements the e-mail header timestamp in a way that should not be affected by any locales as far as I know, so it is curious where the "breakage" is coming from.

> Shall I provide more information?
Yes.
Previous: Christoph MiebachNext: Christoph Miebach
Message 2 of 3 in “Localization: Timestamps get wrong if using different locales”
  1. Christoph MiebachAug 5, 2012
  2. Junio C HamanoAug 5, 2012
  3. Christoph MiebachAug 11, 2012

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.