Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github shows wrong time of commits

Tags:

git

github

This problem happens all the time and it drives me crazy. I will add, commit and push a file up to github and it will display the wrong time as to when it was committed. Sometimes it will show that the commit happened a few days prior to when it actually was just added, committed and pushed (which rules out a simple timezone discrepancy). Even when I initialize a brand new repository and commit a file immediately afterward, it will say that it happened 2 days ago.

If anyone knows of an article or previously answered question that deals with this issue, I would greatly appreciate you pointing it out to me.

like image 848
Noam Avatar asked Nov 19 '13 20:11

Noam


People also ask

How do I see exact commit time on GitHub?

Hover over the 'xx days ago' label on the right-hand side, pause and wait for the Tooltip to appear. Hover over the 'xx days ago' label next to the relevant commit under the History tab, pause and wait for the Tooltip to appear.

Are git commits time stamped?

There are actually two different timestamps recorded by Git for each commit: the author date and the commit date. When the commit is created both the timestamps are set to the current time of the machine where the commit was made.

Do commits have time stamps?

The commit timestamp, based on TrueTime technology, is the time when a transaction is committed in the database. The allow_commit_timestamp column option allows you to atomically store the commit timestamp into a column.


1 Answers

Double-check your system clock. GitHub's UI is showing the timestamp from the commits themselves, which git reads from the system when you make the commit.

A quick way to check this is to make a new commit, then do git log and check that the time and date match the settings on your system.

like image 84
Ben Straub Avatar answered Sep 29 '22 07:09

Ben Straub