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

Q about the date format in "git commit --date=..." and such

From
DSDirk Süsserott <newsletter@dirk.my1.cc>
Date
Mar 6, 2011, 16:07 UTC
Message-ID
<4D73B158.5040409@dirk.my1.cc>
Hello,

I frequently change a file in my repo and commit it with "git commit -a -C deadbeef", i.e. using an older commit message. The "-C" switch also re-uses the author timestamp of the given SHA1, which is not what I want. So I tried the "--date=..." switch in addition, which works fine.

Instead of giving an exact timestamp (like "--date='06.03.2011 16:50'") I'd prefer to just say "--date=now". Is that somehow possible? If not: would the community appreciate it, if I would try to implement this?

I imagine to translate "now" to "localtime(time(0))". Would that be good?
Dirk
Next: Jeff King
Message 1 of 6 in “Q about the date format in "git commit --date=..." and such”
  1. Dirk SüsserottMar 6, 2011
  2. Jeff KingMar 7, 2011
  3. Junio C HamanoMar 8, 2011
  4. Jeff KingMar 8, 2011
  5. Andreas SchwabMar 8, 2011
  6. Dirk SüsserottMar 8, 2011

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.