Windows OS Hub
  • Windows Server
  • Active Directory
  • Windows Clients
  • Virtualization
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

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

February 8, 2019 Windows 10Windows Server 2012 R2

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 or higher, you can use the timedatectl tool:

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
1
Facebook Twitter Google + Pinterest
previous post
Fix: BSOD Error 0x0000007B on Boot on Windows 7 and Server 2008 R2
next post
“The update is not applicable to your computer”: Windows Update Error

Related Reading

Internet Connection Sharing (ICS) Stops Working After Reboot...

September 20, 2021

Fix: Windows Cannot Connect to the Shared Printer

September 17, 2021

Change User Password in an RDP Session on...

September 16, 2021

Storing BitLocker Recovery Keys in Active Directory

September 28, 2021

How to Restore Default Fonts in Windows 10...

September 22, 2021

Internet Connection Sharing (ICS) Stops Working After Reboot...

September 20, 2021

Fix: Windows Cannot Connect to the Shared Printer

September 17, 2021

Change User Password in an RDP Session on...

September 16, 2021

Storing BitLocker Recovery Keys in Active Directory

September 28, 2021

How to Restore Default Fonts in Windows 10...

September 22, 2021

Internet Connection Sharing (ICS) Stops Working After Reboot...

September 20, 2021

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

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • How to Check Office 2019, 2016 and 365 License Activation Status?

    October 1, 2021
  • Fine-Grained Password Policy in Active Directory

    September 30, 2021
  • Enabling Modern or Basic Authentication for Microsoft 365

    September 29, 2021
  • Storing BitLocker Recovery Keys in Active Directory

    September 28, 2021
  • Configuring Kerberos Token Size Using the MaxTokenSize Parameter

    September 23, 2021
  • How to Restore Default Fonts in Windows 10 and 11?

    September 22, 2021
  • Checking Active Directory Domain Controller Health and Replication

    September 21, 2021
  • Internet Connection Sharing (ICS) Stops Working After Reboot in Windows 10

    September 20, 2021
  • Fix: Windows Cannot Connect to the Shared Printer

    September 17, 2021
  • Change User Password in an RDP Session on Windows

    September 16, 2021

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Allow Multiple RDP Sessions in Windows 10?
  • How to Repair EFI/GPT Bootloader on Windows 10?
  • How to Restore Deleted EFI System Partition in Windows 10?
  • Network Computers are not Showing Up in Windows 10
  • Booting Windows 7 / 10 from GPT Disk on BIOS (non-UEFI) systems
  • Error Code: 0x80070035 “The Network Path was not found” after Windows 10 Update
  • Removable USB Flash Drive as Local HDD in Windows 10 / 7
Footer Logo

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


Back To Top