Why does the date/time of a Commit not match the date/time shown under Blame?

Why does the date/time of a Commit not match the date/time shown under Blame?

For Example:

The Blame shows a Timestamp of (9 Years Ago) on 2011-10-29 10:39:58

If I then click the Commit itself, the timestamp is 2011-10-29 10:53:18

Why are these timestamps not identical? What is the difference between the two? Any help appreciated :slight_smile:

Hi @amansaggu26 :wave:

How are you retrieving the dates for these? Please provide the steps so we can reproduce.

Here is what is likely happening.
A Git commit will contain the name, email address and timestamp of two actors — the author, and the committer.
As per the Git - Viewing the Commit History info

You may be wondering what the difference is between author and committer. The author is the person who originally wrote the work, whereas the committer is the person who last applied the work. So, if you send in a patch to a project and one of the core members applies the patch, both of you get credit — you as the author, and the core member as the committer.

The commit view shows when the content was committed, using the committer date.
The blame view shows when the content was authored, using the author date.

You can see both of these dates in full by providing appropriate options to Git log.

$ git log -1 --pretty=fuller ce40c0f8f02e83892eb185aabea306ee2a3ab10e
commit ce40c0f8f02e83892eb185aabea306ee2a3ab10e
Author:     genjix <fake@lol.u>
AuthorDate: Sat Oct 29 11:39:58 2011 +0100
Commit:     genjix <fake@lol.u>
CommitDate: Sat Oct 29 11:53:18 2011 +0100

    BIP 0001, 0011, 0012, 0013.
1 Like

Thanks. This is very helpful! :smiley:

1 Like

As a followup question,

The following changes can be seen under blame
ce40c0f8f02e83892eb185aabea306ee2a3ab10e
7c1296b7b62b5a9c09668e1fd66817596d91e6d3
1647c7e6d3e3866454b803fd874df2d0c4991f4a
72f18918a8ae655212ea2700b30f0dc4d758b843
959fecc15bdad070afa63455468b1dba54655fa6

The following changes can be seen under History
1f64d2b06d628dffdc297be9a8afbb9da4e6b6ca
f6db0af39f6eee60ad7a5d8583ad902c139419a6
d9e890a8f27e46806238e298a346397871fd7e87
1647c7e6d3e3866454b803fd874df2d0c4991f4a
72f18918a8ae655212ea2700b30f0dc4d758b843
959fecc15bdad070afa63455468b1dba54655fa6

Why are these two not shown under History?
ce40c0f8f02e83892eb185aabea306ee2a3ab10e
7c1296b7b62b5a9c09668e1fd66817596d91e6d3

Why are these three not shown under Blame?
1f64d2b06d628dffdc297be9a8afbb9da4e6b6ca
f6db0af39f6eee60ad7a5d8583ad902c139419a6
d9e890a8f27e46806238e298a346397871fd7e87

… to say more simply, why does 7c1296b7b62b5a9c09668e1fd66817596d91e6d3 not show up under History? It was authored and committed, yet the commit doesnt appear