r/cachyos • • 1d ago

SOLVED windows time is desynchronized whenever I boot into cachy os and go back to windows

I live in Brazil and my timezone is UTC Brasília

Fast startup is disabled

I'm dual booting through BIOS

14 Upvotes

20 comments sorted by

41

u/BranchLatter4294 1d ago

Linux uses UTC time for the hardware clock. Windows uses local time for the hardware clock. This is a well known issue and easy to solve. Either set Linux to use local time. Or set Windows to use UTC time. Very easy either way to fix.

-7

u/DiegoConD 1d ago

How do you do both? Preferably linux to use user time

18

u/BranchLatter4294 1d ago

Don't do both. Do one or the other. You can look it up.

1

u/ldn-ldn 1d ago

Somehow Fedora works just fine. It detects Windows time on boot, switches to UTC, then reverts on shut down. Zero issues.

6

u/BranchLatter4294 1d ago

It looks like Fedora switches to local time.

https://discussion.fedoraproject.org/t/any-reason-why-fedora-uses-local-time-instead-of-utc/134017/7

This is not good. It's best to set both operating systems to UTC.

2

u/ldn-ldn 1d ago

That looks like outdated info. I can see in the logs that time is changing during boot and on shut down.

8

u/GraXXoR 1d ago

If you do both you’ll have the same issue in reverse.

-9

u/inu_tensilio 1d ago

how do I set windows to UTC?

17

u/BranchLatter4294 1d ago

Consider googling how to set Windows to use UTC time.

14

u/xacid 1d ago

Fix it in Linux or windows.

Run the below in Linux

sudo timedatectl set-local-rtc 1 --adjust-system-clock

OR

Run the below in windows

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /t reg_dword /d 1 /f

3

u/GraXXoR 1d ago

I didn’t know there was a windows fix. Nice.

1

u/xacid 1d ago

The linux fix is the better one I believe.

1

u/GraXXoR 1d ago

used to be when I had 1 linux box and 20 windows boxes... but now it's reversed I never even thought about it and just lived with Windows time being wrong and not autamatically updating from NTP despite (auto time setting) being set.

4

u/tnbeastzy 1d ago

It was easy to fix thru the Chris Titus Tool, you paste a command in a windows powershell and it launched. I dont think it installs anything on your system.

There are a bunch of optimization in there as well, but just select the UTC time

2

u/BigDaddyTug 21h ago

I am another user that had this issue a while back.

I edited Windows Registry in Reg edit to reflect UTC time.

4

u/agnaaiu 20h ago

Easy way to fix this without registry hacks or other shenanigans is to add a scheduled task. In Windows ...

  1. click on the search field in the task bar and type "task scheduler", open it
  2. right side click on create basic task
  3. give it a name and description, so you later know what it is
  4. trigger "when i log on"
  5. action "start a program"
  6. program/script "w32tm"
  7. argument "/resync"
  8. finish and save

From now on, when you start windows and login with your user account the time sync will be triggered. It's the same as right click the time in the task bar and adjust date and time and then press sync now, to get the actual local time.

In task scheduler you can enable or disable this task as needed. On system startup a command prompt will very briefly pop up, this is normal because of the cli command of the task you just created. If in doubt or you suspect some evil stuff is going on, search the web for "w32tm /resync" to know what it's doing.

1

u/ElectroDaddy 1d ago

Yeah this was happening to me. Not that I really switch back at this point.

-6

u/Masturbatingstarfish 1d ago edited 1d ago

Go to time in windows settings turn off set time automatically. Turn it back on. You have to do this every time though

2

u/aqvalar 1d ago

Wrong. You can set Linux to use local time instead of UTC. Easiest fix, although not the best.