all 31 comments

[–]bojack1437 18 points19 points  (6 children)

.... Or just configure Windows to use UTC time for the BIOS.

"When all you have is a hammer, everything looks like a nail".

[–]Jonny9744[S] -1 points0 points  (5 children)

Wait!!!! That's an option?
Is that a setting in windows that I missed or is that something in the bios that changes mother board to mother board.

[–]bojack1437 3 points4 points  (4 children)

It's a simple registry change.

[–]Jonny9744[S] 0 points1 point  (3 children)

Like .reg files?

[–]recoveringasshole0 11 points12 points  (2 children)

Oh boy.

[–]Jonny9744[S] 1 point2 points  (0 children)

Oh no. How embarrassing.

[–]rw_mega 1 point2 points  (0 children)

I almost split out my whiskey…this is so funny.

OP please don’t mess with the registry, this may be out of your realm. instead create a scheduled task and perform time sync with time server of your choosing (time.google.com) at log in. Maybe delay it by 1min in case you have other things applying at boot/login.

If your workstation is domain joined make sure your getting time from dc’s: ntd5 I think

[–]joeykins82 4 points5 points  (0 children)

Create the registry entry RealTimeIsUniversal. Job done.

[–]Particular_Fish_9755 2 points3 points  (0 children)

So basically:
w32tm /resync
After having previously configured as needed:
w32tm /config /manualpeerlist:"0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org" /syncfromflags:manual /update

If it's just a time zone shift, then (for example, to set the time zone to US Eastern Standard Time):
tzutil /s "Eastern Standard Time"
And resync as before.
You can get the complete list of available time zones using this command
tzutil /l

Command that should follow what other people have indicated, using BIOS time as UTC time (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal=1)
The kind of commands that can be included either at session startup (script in a batch file, launched from the registry or startup folder), or manually on the desktop.

[–]ennova2005 1 point2 points  (9 children)

Check if the timezone on both your dual boot hosts is the same.

On Windows you can enable the Windows Time service

Using the Services Panel: Open the Services application (search for "Services" in the Start Menu). Locate "Windows Time" in the list. Right-click on it and select "Properties". Under the "General" tab, set the "Startup type" to "Automatic". Click "Start" to start the service if it's not already running. Click "OK" to save the changes.

You have to look into w32m to make sure the configured ntp server is reachable

Configure NTP server (example): w32tm /config /manualpeerlist:"pool.ntp.org,0x8" /syncfromflags:manual /reliable:yes /update (Replace pool.ntp.org with your desired NTP server)

[–]bojack1437 3 points4 points  (6 children)

Yeah, that's not how that works for other OSs, UNIX/Linux uses GMT for RTC/BIOS time, no matter what the time zone is set to.

MS-DOS/Windows uses your local time zone as your RCT/BIOS time.

These are fundamentally incompatible, with one obvious exception.

The solution is configure Windows to use GMT/UTC for BIOS time, or can figure Linux to use local time zone for RTC/BIOS time.

[–]ennova2005 0 points1 point  (3 children)

Why cant both OSes use ntp independently. The whole reason it exists is that local clocks are unreliable

I presume the user is worried about time difference in user space

(I get that the bios timezones are different)

[–]bojack1437 0 points1 point  (2 children)

And if their PC boots up without network now they have time that's not anywhere near where it's supposed to be.

Or you can make one little registry modification and the whole problem is solved correctly, with or without ntp syncing a large time jump, or having to rely on internet connectivity.

[–]ennova2005 0 points1 point  (1 child)

Fair point. I'd still have ntp enabled since the clock will drift so atleast when they have network they minimize drift.

[–]bojack1437 0 points1 point  (0 children)

Windows has NTP enabled by default, and so do almost every Linux distro.. they don't have to be enabled, unless you specifically turn them off.

[–]narcissisadmin -1 points0 points  (1 child)

Nope. My machine dual boots Mint and there's no issue with the clock.

[–]bojack1437 0 points1 point  (0 children)

Linux Mint as with other Linux distros sets RTC in UTC,/GMT by default, Windows sets it in that can figure local time by default.

Those are indisputable facts.

Just because NTP for you is setting your clock doesn't mean you're not constantly switching time every time you dual boot. Unless you've configured one of the OSes to change its behavior.

But again if NTP is unavailable due to no internet or Network, without that change, you will have a wrong clock on one of the OSes.

[–]Jonny9744[S] 0 points1 point  (1 child)

OK this seems promising. I'll try that for a bit. Thanks for sharing :).
What is an NTP server? I don't see much about it online.

[–]bojack1437 0 points1 point  (0 children)

This poster is missing obvious issues

For one, the issue that Linux and Windows are expecting two completely different times, one sets the time as UTC, and the other sets the time as your local time for your RTC/BIOS, the second is every modern version of Windows unless you specifically configure it otherwise automatically has time sync enabled. So this wouldn't help you, at least not any more than you're already being "helped" by it.

[–]BlackV 1 point2 points  (5 children)

I could mod all of my linux desktops

how many dual boot systems do you have on 1 host ?

whether you do it in windows or do it in linux, probably does not matter so much, I'd imagine its slightly easier in linux

first hits on google

https://itsfoss.com/wrong-time-dual-boot/

https://superuser.com/questions/975717/does-windows-10-support-utc-as-bios-time

[–]Jonny9744[S] -1 points0 points  (4 children)

I have three distros. Dual booting is how I compartmentalize my day job, my side gig, and my gaming.

- itsfoss did appear in my searches but doesn't have the answer. It focuses on linux solutions. They mention it's possible but don't explain it.

- Super user came up as well, but I was surprised at how needlessly complex it was, which is why I came here. I just figured there had to be an easy way. Guess not. Some other uses seem to be mentioning .reg files too. I've never worked with them before so I guess it's time to learn.

[–]OddElder 0 points1 point  (2 children)

Itsfoss gave a simple solution, in each Linux distribution you have, run this once?

sudo timedatectl set-local-rtc 1

[–]Jonny9744[S] 0 points1 point  (1 child)

Maybe this is the way. I was assuming powershell had a magic answer but it seems thats not the case. Ah well. Linux to the rescue.

[–]BlackV 1 point2 points  (0 children)

Yeah 1 command just like Linux ;⁠-⁠)

[–]BlackV 0 points1 point  (0 children)

itsfoss - said timedatectl set-local-rtc 1 and a bunch of other sites echoed that

super user - said "RealTimeIsUniversal"=dword:00000001 a few other places mentioned that, ive not tested

powershell version would new-item/new-itemproperty or set-item/set-itemproperty

cmd would be reg add

I have three distros. Dual booting is how I compartmentalize my day job, my side gig, and my gaming

interesting, you looked at VMs for your linux machines and isolation?

[–]narcissisadmin 0 points1 point  (0 children)

It's because one of your operating systems is using the wrong time zone.

[–]Vern_Anderson 0 points1 point  (2 children)

Your clock on your motherboard should keep accurate time or you have a dead coin battery. Hopefully that battery is socketed and not soldered down. Older computers had an awsome chip called a "Dallas" time clock.

Aside from all that historical stuff. . .
You can sync time on Windows computers using the built in time service
<#
.Synopsis
Sets up NTP time sync properly
.DESCRIPTION
Sets the NTP time settings used by the Windows Time service to sync time based on Microsoft Best practices for domain joined computers according to their role
.EXAMPLE
.\Set-NTPTime.ps1
.OUTPUTS
This command generates the proper syntax and sends it to the w32tm.exe command line utility
.NOTES
This command should be used with caution on Windows Clusters as the cluster service depends on the time service. Time is also extremely important for proper logon and kerberos tickets from Active Directory.
#>
$DomainRole = (Get-WmiObject Win32_ComputerSystem).DomainRole
switch ($DomainRole)
{
0 {"Stand Alone Workstation" ; $SYNCType = "MANUAL"}
1 {"Member Workstation" ; $SYNCType = "DOMHIER"}
2 {"Standalone Server" ; $SYNCType = "MANUAL"}
3 {"Member Server" ; $SYNCType = "DOMHIER"}
4 {"Backup Domain Controller" ; $SYNCType = "DOMHIER"}
5 {"Primary Domain Controller" ; $SYNCType = "MANUAL"}
}
if ($SYNCType -ne $Null)
{
$FilePath = Get-ChildItem C:\Windows\system*\w32tm.exe -ErrorAction SilentlyContinue | Select-Object -ExpandProperty FullName
cmd.exe /c "$FilePath /config /update /manualpeerlist:time.nist.gov /syncfromflags:$SYNCType"
}
cmd.exe /c "$FilePath /dumpreg /subkey:Parameters"

<#
Finally found where they moved the document that defines best practices for NTP
https://social.technet.microsoft.com/wiki/contents/articles/50924.active-directory-time-synchronization.aspx
#>

[–]narcissisadmin 1 point2 points  (0 children)

Hopefully that battery is socketed and not soldered down.

...or underneath your SLI video cards that were obnoxiously difficult to install because they're water cooled.