Bitbucket Server commit timestamps are not in sync and shows future timestamps

Still need help?

The Atlassian Community is here for you.

Ask the community

For Atlassian eyes only

This article is Not Validated and cannot be shared with customers.

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary


Occasionally, the commit timestamps in Bitbucket may seem out of sync, resulting in future timestamps being displayed for some commits on the overview page of a pull request.

As a result, comments on the pull request may be displayed in the wrong order.

Environment

All versions of Bitbucket Server/Data center.

Diagnosis

You can do a git push from your local machine, note the timestamp and then check the atlassian-bitbucket.log. You will be able to see the future time stamp there in the log.

Cause

The problem is primarily caused by the server's time being changed to a future time. This time change could have resulted from various factors, including hardware clock issues or manual user intervention. To identify the exact cause of the issue, troubleshooting is necessary, which may involve analyzing system logs or reviewing configuration files. Your Linux administrator should be able to assist you in determining the exact cause.

Solution

As per the Install Bitbucket Data Center Documentation you need to ensure all your cluster nodes have synchronized clocks and identical timezone configuration. Here are some examples for how to do this:

For Redhat or centOS

sudo yum install ntp
sudo service ntpd start
sudo tzselect
For Ubuntu Linux 
sudo apt-get install ntp
sudo service ntp start
sudo dpkg-reconfigure tzdata

Alternatively, run the below command on all your data center cluster nodes and on the server where you installed the database.

date

If any of the servers' time is not in sync, use the date --set command. For example, to make the time go back 4 minutes.

sudo date --set="-4 minutes"


Last modified on May 16, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.