5

While configuring VSTS agent locally through command prompt with admin privileges, i've encountered the error below

The local machine's clock may be out of sync with the server time by more than five minutes. Please sync your clock with your domain or internet time and try again

I've tried different google answers but nothing worked out. Please help me

Shalem
  • 1,446
  • 2
  • 22
  • 47
  • 2
    What's the OS do you use? And what if you change the VSTS time zone in `https://account.visualstudio.com/_admin/_home/settings` page same with the time zone with the agent machine? – Marina Liu Oct 24 '17 at 08:13
  • I'm using Windows 10 Enterprise. I've checked the timezone w.r.to machine,both were different previously. I've set them now and tried configuring the agent again. This resolved my iisue – Shalem Oct 24 '17 at 08:41
  • My issue Resolved. Thank you @Marina-MSFT – Shalem Oct 24 '17 at 08:44
  • Glad to hear your problem solved. I added it as an answer, you can mark it. And it will benefit others who have similar questions :) – Marina Liu Oct 24 '17 at 08:47
  • @Shalem I am also facing the same issue, I have updated timezone in my VSTS organization, but still, it not worked for me. How much time does it take after modifications? Have you restarted Machine/Service? – Nilay Mehta Aug 25 '18 at 14:55
  • @Shalem As Nilay said. I have also updated timezone in my devops organization. But still this does not work for me. What to do? Do I need to restart/update something else – user3228992 Jan 11 '20 at 20:41
  • @Nilay Did you find a solution for this? I've restarted the machine and the service, but still the same issue – user3228992 Jan 11 '20 at 20:45
  • @user3228992 No luck. – Nilay Mehta Jan 13 '20 at 06:27

4 Answers4

4

It's mainly caused the time for agent machine is asynchronous with the time shows in VSTS.

You can check if the time zone for your agent machine is same with the time zone in VSTS settings page (https://account.visualstudio.com/_admin/_home/settings).

Marina Liu
  • 36,876
  • 5
  • 61
  • 74
2

The error message is helpful in that it tells you most of what you need to know. Specifically, that you need to ensure the timezones of the machines are in sync.

For Azure DevOps Services, the location of the timezone setting is now found at:

'Organization Settings' > 'Overview' > 'Time Zone'

In my case, I also needed to ensure the time settings on the machine hosting the agent were correct.

Right-click the time(bottom-right by default) > 'Adjust date/time'
derekbaker783
  • 8,109
  • 4
  • 36
  • 50
1

I too had same issue recently. Thanks for the answer. Just to summarize

Sync the TimeZone in VSTS account settings page (https://account.visualstudio.com/_admin/_home/settings) to Local system DateTime.

In Case Timezone differs in Local, try this & change TimeZone and time

http://www.dummies.com/computers/operating-systems/windows-10/how-to-change-the-date-or-time-on-the-windows-10-desktop/

srinivas p
  • 67
  • 1
  • 7
0

You can sync the time in a CMD window with:

wsl -d docker-desktop -e /sbin/hwclock -s

Restart the agent after syncing.

Astrophage
  • 1,231
  • 1
  • 12
  • 38