Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Windows 10 / Fix: Clock Reverts to Wrong Time After Computer (Server) Reboot

March 12, 2024 Windows 10Windows Server 2019

Fix: Clock Reverts to Wrong Time After Computer (Server) Reboot

In this article, we’ll consider why the system clock displays incorrect time and date after a shutdown, restart or resuming from hibernation of a laptop/computer/server. Time is reset each time and you have to set it manually. We’ll dwell on the most typical case: a rundown BIOS battery and more interesting ones involving Windows/Linux dual boot on one computer, and a firmware bug on HPE ProLiant G9 /G8 servers with Windows Server OS.

Contents:
  • System Not Saving Data/Time Due to Weak BIOS/CMOS Battery
  • Windows: Set Clock Synchronization with time.windows.com
  • Troubleshooting time synchronization for AD domain-joined computers
  • Windows & Linux Showing Different Times When Dual Booting
  • HPE Servers with Windows Server: Offset in the System Time After Restart

System Not Saving Data/Time Due to Weak BIOS/CMOS Battery

The typical answer to the question “Why are the time and date reset on my computer after reboot?” is the BIOS (CMOS) battery rundown. This battery is responsible for keeping BIOS/UEFI settings when your computer or laptop is unplugged, and provides autonomous operations of the built-in hardware clock.

If the battery has run down, when the motherboard is not powered, BIOS cannot keep its settings and all of them are reset, including current date and time. If your computer is quite old, it is very likely that your battery is dead. We strongly recommend to replace it. It is not hard, and the process doesn’t require any special engineering skills. In most home and even enterprise devices a standard 3V CR2032 battery is used in BIOS.

replace 3V CR2032 battery in BIOS

If the battery replacement hasn’t helped, check the state of the jumper used to reset BIOS settings (The jumper is located close to the battery bay and is marked as CMOS / CLEAR / RESET). Somebody may have left it in the RESET position. Thus, each time when your motherboard is powered, BIOS settings are reset. Move the jumper to its normal position.

The next option is to update BIOS firmware of your motherboard. See how to do it on the website of your hardware vendor. Newer firmware often has different bugs fixed.

Windows: Set Clock Synchronization with time.windows.com

If your date/time settings in Windows are constantly changing, first of all you should check the current time zone settings and the parameters of time synchronization with the external time server. In Windows 10, you can see the current time settings in the Control Panel -> Clock and Region -> Date and Time. In this example, you can see, that the time zone UTC + 01 is specified, and Daylight Saving Time is enabled.

time zone settings in windows 10

Tip. You can set your time zone in Windows from the command prompt using tzutil tool or PowerShell.

If your computer is not joined to the AD domain, check its time synchronization settings with the external time source (NTP time server). To do it, click Internet Time tab and make sure that the automatic synchronization with time.windows.com server is set.

windows 10 internet time synchronize settings

Troubleshooting time synchronization for AD domain-joined computers

If your computer is part of an Active Directory domain, you need to understand the architecture of time synchronization in the AD domain.

The following time synchronization scheme is used in the Active Directory domain:

  • The root domain controller in the AD forest, to which the FSMO role of the PDC emulator belongs, is a time source for all other DCs of this domain;
  • Other DCs synchronize time with PDC;
  • Ordinary domain members (servers and workstations) synchronize time with the nearest available domain controller according to the AD topology.

Root PDC can synchronize its time with both an external source and with itself (by default).

You can find a domain controller with the PDC role with the command:

netdom /query fsmo

To configure time synchronization with an external NTP server on the PDC, the following commands are used.

Configure external time sources:

w32tm /config /manualpeerlist:"0.nl.pool.ntp.org,0x1 1.nl.pool.ntp.org,0x1 2.nl.pool.ntp.org,0x1 3.nl.pool.ntp.org,0x1"

Make this DC a reliable time source for the clients:

w32tm /config /reliable:yes

Restart w32 time server to synchronize DC time with nl.pool.ntp.org time servers:

net stop w32time && net start w32time

You can view the synchronization source and status:

w32tm /query /peers

Start synchronization in manual mode:

w32tm /resync /rediscover

Windows & Linux Showing Different Times When Dual Booting

We should separately consider the cases when two operation systems (Windows & Linux) are installed on a computer in Dual Boot configuration. You can come across the problem that after booting to another system (booting to Linux after Windows) the time is several hours ahead or late of the actual time.

Windows and Linux work with BIOS time differently. They are using two different time formats: UTC and localtime.

GNU/Linux operation systems (including Mac OS X) assume the time in BIOS is in UTC format (GMT). Accordingly when booting, Linux converts the UTC time by adding (or distracting) the offset of the current time zone selected by the user. It means that in order to get the local time for Athens time zone UTC+2, Linux will add 2 hours.

Windows thinks that time in BIOS is kept in the localtime format, and if you have specified a new time zone or synchronized time with the external source, the system will make corresponding changes to the local time in BIOS. Linux (Ubuntu, in my case) thinks that time in BIOS is specified in UTC format and adds extra time zone offset. This is the reason why time gets wrong when switching from Linux to Windows and vice versa.

To fix it, you should make Windows use UTC time format in RealTimeIsUniversal registry parameter.

reg add "HKLMACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /t REG_DWORD /d 1 /f

RealTimeIsUniversal TimeZoneInformation

Tip. In 64-bit Windows versions, you need to create QWORD-type parameter instead of DWORD ones:

reg add HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation /v RealTimeIsUniversal /t REG_QWORD /d 1

Also, disable time synchronization with the Internet in Windows, since at each time update Windows will reset UTC time to local.

sc config w32time start= disabled

Restart your Windows.

Or you can make Linux use local time. In Ubuntu 15.04 and newer, you can use the timedatectl command:

timedatectl set-local-rtc 1

timedatectl set-local-rtc 1

HPE Servers with Windows Server: Offset in the System Time After Restart

One of my remote customers came across an interesting problem after a time zone change on HPE DL/ML Gen9 servers running Windows Server 2008 R2 / 2012 R2. As it turned out, when changing a system time or a time zone on HP ProLiant Gen9 servers (and on one of HP ProLiant DL580 Gen8 servers), system time was not saved and was reset to the previous one after the restart. The problem occurred on the servers, on which Windows Server booted in the Legacy mode (with native UEFI boot, there weren’t any time change problems).

The following event appeared in the system log:
The system time has changed to ‎2019‎-‎01‎-‎29T12:12:28.500000000Z from ‎2019-‎01‎-‎29T13:12:27.923115700Z.
Change Reason: System time synchronized with the hardware clock.

As a solution of this problem, HP suggests to update ROM version to at least 1.5. This is the version of ROM-Based Setup Utility (RBSU) that has no time reset bug.

Or as a workaround solution, you can set that BIOS provides Windows the UTC system time (instead of the local time). To do it, as we have already told above, you must create a parameter with the name RealTimeIsUniversal and the value 1 in the registry key HKLM\SYSTEM\CurrentControlSet\Control\TimeZoneInformation.

3 comments
5
Facebook Twitter Google + Pinterest
previous post
Managing Printers from the Command Prompt in Windows
next post
Downloading (Transferring) Large Files Using PowerShell and BITS

Related Reading

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

Uninstalling Windows Updates via CMD/PowerShell

April 18, 2025

Allowing Ping (ICMP Echo) Responses in Windows Firewall

April 15, 2025

How to Pause (Delay) Update Installation on Windows...

April 11, 2025

How to Prefer IPv4 over IPv6 in Windows...

April 9, 2025

3 comments

Ankush Chandran April 2, 2020 - 7:31 am

Had the same issue when dual booting Windows 10 and Ubuntu 18.04.
Following the steps in “Windows & Linux Showing Different Times When Dual Booting” solved my problem perfectly. Thanks !

Reply
Bruce September 14, 2020 - 6:28 am

Thanks!

Reply
M January 25, 2021 - 11:23 am

so the only way to originally prevent it from happening to domain joined windows machine is to replace the BIOS clock?

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Booting Windows from GPT Disk on BIOS (non-UEFI) Computer
  • Removable USB Flash Drive as Local HDD in Windows
  • How to increase KMS current count (count is insufficient)
  • How to Disable UAC Prompt for Specific Applications in Windows
  • How to Connect L2TP/IPSec VPN Server From Windows
  • Managing Printers and Drivers on Windows with PowerShell
  • How to Install Only Specific Apps in Office 2021/2019 or Office 365
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top