Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFServer : Cannot update data because the server clock may have been set incorrectly

I am working on project which is on the TFServer. every thing was fine till today which the server time changed to 4 hours ahead. i cann't check in any thing from then because i get the following error

TFS2010 TF54000: Cannot update data because the server clock may have been set incorrectly. Contact your Team Foundation Server Administrator

i searched in internet i found this http://www.windows-tech.info/4/d1a37cfc6cf38a79.php

so i look into the tbl_Changeset i have two records for today

780 1 2013-12-09 11:13:56.930 807 1 781 1 2013-12-09 11:16:40.727 808 1

i am writing this post on 14:00 which definately bigger than 11:13, so i couldn't checkin again?

like image 424
nnmmss Avatar asked Nov 23 '25 11:11

nnmmss


1 Answers

This usually occurs when changesets have future times, possibly due to a system clock being temporarily set in the future. To fix it, first run this query against the relevant collection DB (e.g. Tfs_DefaultCollection):

SELECT TOP 20 *
FROM tbl_ChangeSet
ORDER BY CreationDate DESC

You will probably see a row with a CreationDate in the future

Update the errored rows to a sensible time in the past:

UPDATE tbl_ChangeSet SET CreationDate = '2014-07-10 05:51:04.160' WHERE ChangeSetId = 73 
like image 116
Jason Crease Avatar answered Nov 25 '25 10:11

Jason Crease