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

Re: [PATCH] Pretty-print date in 'git log'

From
SMSanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Date
Apr 18, 2005, 19:57 UTC
Message-ID
<E1DNcMp-0006sk-00@skye.ra.phy.cam.ac.uk>
In-Reply-To
<1113850922.23938.54.camel@orca.madrabbit.org>
> ray:~/work/home$ date -ud 'jan 1, 1970 + 1111111111 seconds'
> Fri Mar 18 01:58:31 UTC 2005
> ray:~/work/home$ date -ud 'jan 1, 1970 + 1111111111 seconds + 0800'
> Fri Mar 18 09:58:31 UTC 2005

I sent David a short script to do almost that, except that mine needed to negate the timezone whereas yours elegantly changes +0800 to + 0800

In your 2nd example, you'll need 'sed' to replace UTC (or +0000 if using -R) in the output by +0800, because the 1111111111 is the UTC seconds, so the actual time is Fri Mar 18 01:58:31 UTC 2005 (as given by your first example).

-Sanjoy
Previous: Ray Lee
Message 3 of 3 in “Pretty-print date in 'git log'”
  1. Pretty-print date in 'git log'David Woodhouse, Apr 18, 2005
  2. Ray LeeApr 18, 2005
  3. Sanjoy MahajanApr 18, 2005

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.