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

:format:%s for date fields seems to be shifted by timezone

From
clime <clime7@gmail.com>
Date
May 3, 2020, 10:15 UTC
Message-ID
<CAGqZTUu2U6FFXGTXihC64O0gB5Bz_Z3MbD750kMoJWMciAGH6w@mail.gmail.com>
Hello!
my current timezone is UTC+0200.
I create a test repo, add one commit and create a tag:
Now:

$ git for-each-ref --format="%(taggerdate:format:%s)" refs/tags 1588504146

$ date +"%s" 1588500585

$ git for-each-ref --format="%(taggerdate:raw)" refs/tags 1588500546 +0200

Somehow %(taggerdate:format:%s) gives a Unix timestamp which is one hour in future and it is different than what ` date +"%s"` gives around approximately the same time the tag was created.

clime
Next: Jeff King
Message 1 of 4 in “:format:%s for date fields seems to be shifted by timezone”
  1. climeMay 3, 2020
  2. Jeff KingMay 4, 2020
  3. climeMay 6, 2020
  4. Jeff KingMay 6, 2020

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.