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

Is there way to set git commit --date to be older than 1970 ?

From
PVPeter Vojtek <peter.vojtek@gmail.com>
Date
Oct 29, 2014, 18:49 UTC
Message-ID
<CAOE_JxJp0nA_p_42yOyk_nMjsyMaovj0Fx6AJ5nywiEQfB5XAQ@mail.gmail.com>
Hello all,

I am playing with git in slightly unusual manner - e.g., to use git to store history of europe:

$ touch Italy $ git add Italy $ git commit -m "add Italy" --date="01/01/1861T01:01:01" # Italy gained sovereignity at year 1861 fatal: invalid date format: 01/01/1861T01:01:01

It seems the commit date can be between 1970 and 2100 (on my 32bit linux), however man git (section DATE FORMATS) claims ISO 8601 standard is supported. ISO 8601 allows even B.C. dates (via minus sign).

I understand that this is rather an esoteric use case :)
Regards,
Peter
Next: Fredrik Gustafsson
Message 1 of 9 in “Is there way to set git commit --date to be older than 1970 ?”
  1. Peter VojtekOct 29, 2014
  2. Fredrik GustafssonOct 29, 2014
  3. Peter VojtekOct 29, 2014
  4. Junio C HamanoOct 29, 2014
  5. Roberto Eduardo Decurnex GorositoOct 29, 2014
  6. Dan JohnsonOct 30, 2014
  7. Jeff KingOct 30, 2014
  8. Junio C HamanoOct 30, 2014
  9. Junio C HamanoOct 30, 2014

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.