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

Config timezone to prevent chaos when DST/changing timezone

From
DDDevste Devste <devstemail@gmail.com>
Date
Feb 7, 2025, 22:02 UTC
Message-ID
<CANM0SV3DXQeNinmy1Spj7n6G=5s3jMcFrAb0Ayun6ago7F3qWw@mail.gmail.com>

Issue: 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.

I found the discussion about user.hideTimezone https://public-inbox.org/git/CAEOYnAQYMrNAe9s1V-0DVLdL-B_KpHMDP5e=yRnbCkMWdrvFHQ@mail.gmail.com/T/#u and https://git.github.io/rev_news/2023/08/31/edition-102/

While there are workarounds, these aren't possible in all cases (e.g. "export TZ=UTC0" won't work with many IDEs since they run git in a separate shell and has side-effects on non-git commands. Using pre/post-commit/rewrite/merge hooks won't guarantee it's correct e.g. if bypassing them if there checks in there that should be skipped)

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

Next: brian m. carlson
Message 1 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.