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

Re: Config timezone to prevent chaos when DST/changing timezone

From
Andreas Schwab <schwab@linux-m68k.org>
Date
Feb 8, 2025, 09:28 UTC
Message-ID
<87seooss2u.fsf@linux-m68k.org>
In-Reply-To
<CANM0SV3DXQeNinmy1Spj7n6G=5s3jMcFrAb0Ayun6ago7F3qWw@mail.gmail.com>
On Feb 07 2025, Devste Devste wrote:
> With DST or manual timezone changes (e.g. travelling) you can end up
> with commits that are illogically sorted - newer commits have an
> author/committer date that is older than older commits.

The time stamps in commits are recorded in Universal Time, so neither DST nor timezone changes (both are essentially equivalent) have an influence on how the time stamp is interpreted as a point in time.

> There should be an easy way to force a specific timezone - or in
> absence of that at least force UTC - to prevent this

You can use --date=local to show all dates in your local time zone, instead of the recorded time zone of the author/committer.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Previous: brian m. carlsonNext: Junio C Hamano
Message 3 of 4 in “Config timezone to prevent chaos when DST/changing timezone”
  1. Devste DevsteFeb 7, 2025
  2. brian m. carlsonFeb 7, 2025
  3. Andreas SchwabFeb 8, 2025
  4. Junio C HamanoFeb 8, 2025

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.