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

Re: [BUG] internal date format does not accept small unix timestamps

From
KHKristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Date
May 29, 2026, 12:50 UTC
Message-ID
<a8e51dda-7b1d-426e-9af9-cf856c42342d@app.fastmail.com>
In-Reply-To
<fffe0ea9-baea-47cc-b354-5be4fff08983@luna.gl>
On Fri, May 29, 2026, at 13:51, Luna Schwalbe wrote:
Show 21 quoted lines
> While trying to create some test commits, I noticed the following issue:
>
> GIT_AUTHOR_DATE and GIT_COMMITTER_DATE should accept the "Git internal
> format" (displayed by git log with --date=raw), but this fails for small
> unix timestamps. A quick binary search indicates that it happens when
> the unix timestamp is below 100000000 (9 digits).
>
> So for example, GIT_AUTHOR_DATE='99999999 +0000' fails with "fatal:
> invalid date format", while GIT_AUTHOR_DATE='100000000 +0000' works as
> expected.
> It seems to be unaffected by the choice of timezone offset.
> Padding the timestamp with zeroes also does not change the behavior.
>
> The --date option does accept all the values, but interprets them
> wrongly and gives bogus results (most of them time it seems to act as if
> no date option was given, using the current system time, but with some
> inputs I've also observed things like "current date&time but set the
> year to 2000").
>
> I tested everything with git built from commit
> 2f8565e1d14d2de4cfbc9da0132131bf0d0dc087.
Apparently you need `@` in front for small Unix Epoch values. `@0 +0000`
Previous: Luna SchwalbeNext: Luna Schwalbe
Message 2 of 6 in “[BUG] internal date format does not accept small unix timestamps”
  1. Luna SchwalbeMay 29, 2026
  2. Kristoffer HaugsbakkMay 29, 2026
  3. Luna SchwalbeMay 29, 2026
  4. Junio C HamanoMay 29, 2026
  5. doc: document '@' prefix for raw timestampsJunio C Hamano, May 30, 2026
  6. Luna SchwalbeMay 31, 2026

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.