* git log decipher
@ 2011-07-21 1:39 gbhumphrey
2011-07-21 1:50 ` Shawn Pearce
2011-07-21 11:41 ` Jakub Narebski
0 siblings, 2 replies; 3+ messages in thread
From: gbhumphrey @ 2011-07-21 1:39 UTC (permalink / raw)
To: git
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 <XXX@XXXX.com>
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?
--
View this message in context: http://git.661346.n2.nabble.com/git-log-decipher-tp6605124p6605124.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git log decipher
2011-07-21 1:39 git log decipher gbhumphrey
@ 2011-07-21 1:50 ` Shawn Pearce
2011-07-21 11:41 ` Jakub Narebski
1 sibling, 0 replies; 3+ messages in thread
From: Shawn Pearce @ 2011-07-21 1:50 UTC (permalink / raw)
To: gbhumphrey; +Cc: git
On Wed, Jul 20, 2011 at 18:39, gbhumphrey <greg_spam@gbhumphrey.com> wrote:
> 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 <XXX@XXXX.com>
> 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git log decipher
2011-07-21 1:39 git log decipher gbhumphrey
2011-07-21 1:50 ` Shawn Pearce
@ 2011-07-21 11:41 ` Jakub Narebski
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Narebski @ 2011-07-21 11:41 UTC (permalink / raw)
To: gbhumphrey; +Cc: git
gbhumphrey <greg_spam@gbhumphrey.com> writes:
> 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 <XXX@XXXX.com>
> 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?
If you want to *view* this information, why not use "git reflog" or
"git log -g" instead of reading raw files?
If you want to *parse* this information:
- "1307594233" is Unix epoch, i.e. number of seconds since
'00:00:00 1970-01-01 UTC'; it is independent on timezone
- "-0700" is RFC-2822 style numeric timezone; informational
From RFC-2822 (http://tools.ietf.org/html/rfc2822#section-3.3)
The zone specifies the offset from Coordinated Universal Time (UTC,
formerly referred to as "Greenwich Mean Time") that the date and
time-of-day represent. The "+" or "-" indicates whether the
time-of-day is ahead of (i.e., east of) or behind (i.e., west of)
Universal Time. The first two digits indicate the number of hours
difference from Universal Time, and the last two digits indicate the
number of minutes difference from Universal Time. (Hence, +hhmm
means +(hh * 60 + mm) minutes, and -hhmm means -(hh * 60 + mm)
minutes). The form "+0000" SHOULD be used to indicate a time zone at
Universal Time. Though "-0000" also indicates Universal Time, it is
used to indicate that the time was generated on a system that may be
in a local time zone other than Universal Time and therefore
indicates that the date-time contains no information about the local
time zone.
--
Jakub Narębski
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-21 11:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-21 1:39 git log decipher gbhumphrey
2011-07-21 1:50 ` Shawn Pearce
2011-07-21 11:41 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).