Time does not update automatically on Windows 10

3

I have a really big problem with the time on windows 10. Every time I start computer, I have to manually set the correct time. I don't know what the problem is. In settings "Set time automatically" is enabled. Also, I changed startup type of Windows Time service to automatic. Nothing helped me. Maybe it will be useful information, I have two OS on the computer: Windows 10, Ubuntu. Moreover, the time doesn't update only if I used Ubuntu before starting Windows 10.

irakliy01

Posted 2017-11-11T19:24:45.577

Reputation: 33

1Time is controlled by your BIOS/UEFI and is kept active by a battery. If the battery is dying then the time and date could reset to a specific number. But it is more likely that Ubuntu is somehow changing the time. – LPChip – 2017-11-11T19:34:50.097

@LPChip I understand. But on Ubuntu time is correct every time I launch it. Maybe there is a way to automatically update the time through the internet on Windows 10 when I start it? – irakliy01 – 2017-11-11T19:39:12.723

Are you able to ping your NTP Server? – Ramhound – 2017-11-11T19:48:51.297

1When the time is incorrect, what is the value? Is it like an hour off, a few minutes off, or specific: 0:00? Also, is the date off too? – LPChip – 2017-11-11T19:59:48.893

@Ramhound, pastebin - is this information helpful? I don't know how to ping my NTP server, because I don't know what domain it has

– irakliy01 – 2017-11-11T20:08:57.933

@LPChip, most often the time lags behind for a couple of hours. The date is always correct – irakliy01 – 2017-11-11T20:13:08.353

Are you using the default Windows NTP provider? If you cannot ping, time.windows.com, then that’s the source of your problem. – Ramhound – 2017-11-11T20:39:02.623

@Ramhound, yes, I am – irakliy01 – 2017-11-11T20:41:04.607

Is it exactly that many hours off? Sounds like the timezone might be off. – LPChip – 2017-11-11T21:06:18.627

@LPChip, minutes are wrong too. For example, now it shows 23:11 but in Moscow it is 00:13. I set time zone manually to UTC+03:00. It didn't help – irakliy01 – 2017-11-11T21:13:57.013

If you change your NTP provider to something other then time.windows.com does the behavior you describe still happen? – Ramhound – 2017-11-11T22:50:13.500

@Ramhound, no, it didn't help. For some reason in services Windows Time is now set to Manually – irakliy01 – 2017-11-12T22:05:32.890

So set it to automatic – Ramhound – 2017-11-13T02:10:53.243

Answers

3

Most probably Linux tries to keep your hardware clock as UTC. It recalculates to the desired timezone every time it's needed. This makes the hardware clock independent of timezone, particular OS, DST etc. Two OS-es with different timezone settings may peacefully coexist, if only they agree the hardware clock is UTC.

Windows on the other hand annexes hardware clock to itself. It uses local time and expects hardware clock to be set according to it. Two such impertinent OS-es with different timezone settings will constantly struggle over a hardware clock. And because Linux tries to keep it as UTC, it will also struggle with Windows, unless local time in Windows should match UTC (but in your case it should not).

There are few ways to deal with this. Pick one:

  1. Let every OS synchronize via NTP on its own and set the hardware clock back and forth. Until NTP daemon/service kicks in, the system clock may be off. If the daemon/service fails to do its job, the system clock may be off. Your comments make me believe your Windows Time Service doesn't start at all; it should start automatically. I guess the time is off also when you start your Ubuntu, but Linux gets the clock right via NTP before you know it.

  2. Make Windows support UTC as hardware time. See this answer to relevant question. Note it requires you to stop Windows Time Service.

  3. Make Ubuntu use local time as hardware time. According to this answer:

    Check that /etc/adjtime is configured correctly. The third line must contain UTC (exactly these three characters) if the hardware clock uses UTC, and something else (e.g. empty) if the hardware clock uses local time (in the time zone defined by /etc/timezone).

    Obviously timezone settings on both OS-es should match. I believe with this method you can keep syncing via NTP on one OS or both of them.


Edit

The third way requires there is /etc/adjtime. If there's not one in your Ubuntu then I believe this answer gives the right hint:

If file /etc/adjtime is not present, systemd assumes the hardware clock is set to UTC.

The hardware clock can be queried and set with the timedatectl command. To change the hardware clock time standard to localtime, use:

sudo timedatectl set-local-rtc 1

If you want to revert to the hardware clock being in UTC, do:

sudo timedatectl set-local-rtc 0

These will generate /etc/adjtime automatically and update the RTC accordingly; no further configuration is required.

Kamil Maciorowski

Posted 2017-11-11T19:24:45.577

Reputation: 38 429

I don't have file /etc/adjtime – irakliy01 – 2017-11-16T16:00:20.237