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

Re: git log decipher

From
Shawn Pearce <spearce@spearce.org>
Date
Jul 21, 2011, 01:50 UTC
Message-ID
<CAJo=hJvvsqki3tLoQRjgf7vQpcH6EHMXXxUbYALw8MvtLzF=gA@mail.gmail.com>
In-Reply-To
<1311212351172-6605124.post@n2.nabble.com>
On Wed, Jul 20, 2011 at 18:39, gbhumphrey <greg_spam@gbhumphrey.com> wrote:
Show 8 quoted lines
> Hi so in the .git/logs/refs/heads there are log files, i'm tryign to decipher
> the timestamp, at least I think it's a time stamp. An entry looks like this:
> a391d7a96af8c06a626eec23565ceccef81bc350
> fdfb6d8c87521d56d8a6034e8575304013ecdd6c Greg Humphrey &lt;XXX@XXXX.com&gt;
> 1307594233 -0700        merge US199: Merge made by recursive.
>
> The "1307594233 -0700" seems to be a timestamp, but I'm not sure what
> format, anyone have any ideas how to convert to a human readable?

The first number is the seconds since the UNIX epoch. A standard time_t... in base 10. :-)

The second number is the timezone offset from GMT, in HHMM format. So -0700 is 7 hours behind GMT.

Its the same format as what appears in a Git commit object for either the author or committer line.

-- 
Shawn.
Previous: gbhumphreyNext: Jakub Narebski
Message 2 of 3 in “git log decipher”
  1. gbhumphreyJul 21, 2011
  2. Shawn PearceJul 21, 2011
  3. Jakub NarebskiJul 21, 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.