Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can a commit ID be in future than the pull req date ( Commit and push done on same date wrt US)

Deleted user September 7, 2019

Team I deal with is an onshore project ie United states, One of the observation is some of the team commit date's are next date, at the time when I had this observation all the time zones in united states are on current date, is this anyway related to data center's of bit bucket?

1 answer

1 vote
Julius Davies [bit-booster.com]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2019

 

Technically the date of the commit can be set to any time (past, present, or future!).  It is recorded at the moment the commit is created, and typically the current time of the computer creating the commit is used.

But that is probably not why you are seeing out-of-order dates.  More often users experience out-of-order dates because Bitbucket displays AUTHOR_DATE and not COMMITTER_DATE.

If developers rebase or squash, that updates the COMMITTER_DATE, but leaves AUTHOR_DATE at its original value.   This can make it look like things are out-of-order in the Bitbucket UI.

From a local clone try typing "git log pretty=fuller" to see if this is the underlying issue (AUTHOR_DATE out-of-order, but COMMITTER_DATE correct).

If this turns out not to be the underlying cause, maybe try "git log pretty=raw" to see if timezones are the culprit - under the hood git records the timezone offset in the commit object.

 

If the problem is from AUTHOR_DATE, try installing the free Commit Graph for Bitbucket plugin.   It uses COMMITTER_DATE in its graph, and it also switches Bitbucket to display COMMITTER_DATE on the "/commits" page.

Full disclosure:  my company (bit-booster.com) maintains Commit Graph for Bitbucket.

Deleted user September 8, 2019

Thank you, If I am not wrong the commit date coming in email alert of pull request is GMT time, I think that is the reason I am seeing the difference.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events