- Fix: Clock Reverts to Wrong Time After Computer (Server) Reboot
- 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
- Перевод песни Cyndi Lauper — Time after time
- Time after time
- Время от времени
- Примечания
- Time after time to windows
- System Requirements
- Known Limitations
- Events Used by TurnedOnTimesView
- Versions History
- Start Using TurnedOnTimesView
- Command-Line Options
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.
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.
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.
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.
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
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
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.
Перевод песни Cyndi Lauper — Time after time
Данный перевод песни на русском языке является художественным, т.е. перевод недословный. Чтобы узнать дословный перевод песни, можете наводить мышкой на английские слова.
Time after time
Lying in my bed I hear the clock thick
And think of you
Caught up in circles confusion
Is nothing new
Flashback warm nights
Almost left behind
Suitcases of memories
Time after sometimes you picture me
I’m walking too far ahead
You’re calling to me I can’t hear
What you’ ve said
When you say
go slow I fall behind
The second hand unwinds
If you’re lost you can look
And you will find me
Time after time
If you fall I will catch you
I’ll be waiting time after time
After my picture fades and
Darkness has turned to grey
Watching through windows
You’re wondering
If I am O.K.
Secrets stolen from deep inside
The drum beats out of time
If you’re lost you can look
And you will find me
Time after time
If you fall I will catch you
I’ll be waiting time after time
Время от времени
Лежу в своей постели, слышу, как тикают часы
И думаю о тебе
Смятение как замкнутый круг
Ничего нового
Вспоминаю теплые ночи,
Почти забытые.
Чемоданы воспоминаний
Временами ты фотографируешь меня
Я ухожу слишком далеко вперед
Ты зовешь меня, я не слышу,
что ты сказал
Когда ты говоришь:
«Притормози — я не успеваю за тобой!»
Секундная стрелка мелькает
Если ты потерян, ты можешь оглядеться
И увидишь меня
Время от времени
Если падаешь, я поймаю тебя
Я буду ждать, время от времени
После того, как мои фото потускнеют, и
Темнота померкнет.
Глядя в окно,
Ты интересуешься,
В порядке ли я.
Секреты похищены из глубины
Барабан стучит не в такт.
Если ты потерян, ты можешь оглядеться
И увидишь меня
Время от времени
Если падаешь, я поймаю тебя
Я буду ждать, время от времени
Примечания
Песня является саундтреком сериала «Доктор Хаус».
Time after time to windows
System Requirements
- This utility works on any version of Windows, starting from Windows 2000 and up to Windows 10. both 32-bit and 64-bit systems are supported.
- On Windows Vista/7/8, TurnedOnTimesView generally works without elevation (admin rights). However, in order to get information about system shutdown caused by a system crash (blue screen), you should right-click on TurnedOnTimesView.exe and choose ‘Run As Administrator’.
Known Limitations
- TurnedOnTimesView based on a few types of events on the event log of Windows to detect when the computer was turned off and on. It generally works quite well, but it’s still possible that you’ll get a false positive, which means that TurnedOnTimesView will show that the computer was turned off and on, even when the computer was not actually turned off.
- When the computer is turned off improperly (For example, on a power outage), TurnedOnTimesView will not be able to detect the shutdown time, and the icon of this item will be red instead of green.
- If you clear your system event log, TurnedOnTimesView will not be able to detect the shutdown/startup times.
- On systems prior to Windows Vista, Shutdown Reason, Shutdown Type, and Shutdown Process fields are usually empty.
Events Used by TurnedOnTimesView
Versions History
- Version 1.42:
- Added option to show only activity in the last xx days (‘Advanced Options’ window).
- Version 1.41:
- You can now send the data to stdout by specifying empty string as filename, for example:
TurnedOnTimesView.exe /scomma «» | more - Added /RunAsAdmin command-line option for running TurnedOnTimesView as administrator.
- You can now send the data to stdout by specifying empty string as filename, for example:
- Version 1.40:
- Added ‘Use New Event Log API’ option. You should try this option if you have the latest updates of Windows 10 and TurnedOnTimesView stopped working. Be aware that currently when using the ‘Use New Event Log API’ option, the loading process is slower than the old API mode.
- Version 1.35:
- Added option to connect multiple remote computers (In ‘Advanced Options’ window).
- Added ‘Computer Name’ column.
- Version 1.31:
- Added option to choose another font (name and size) to display in the main window.
- Version 1.30:
- Added ‘Last System Event Time’ column, which displays the time of the last system event before the computer was turned off. This column is useful when there is no shutdown event and the ‘Shutdown Time’ column is empty.
- When there is no shutdown event (‘Shutdown Time’ is empty), the duration is now calculated according to the ‘Last System Event Time’.
- When event 41 from Microsoft-Windows-Kernel-Power is detected (‘The system has rebooted without cleanly shutting down first’), the ‘Shutdown Type’ column now displays ‘Unexpected Shutdown’.
- Fixed issue: Under certain circumstances, TurnedOnTimesView detected the turn on/off events incorrectly because the algorithm assumes that the events are sorted by their timestamp, but in some cases they are not. TurnedOnTimesView now sorts the events by their timestamp before processing them to ensure that the turn off/on detection algorithm works correctly. Be aware that due to this change the loading process might be slower and consume more memory.
- Added ‘Save All’ (Shift+Ctrl+S).
- Version 1.25:
- TurnedOnTimesView now reads archive log files also on a remote computer ( from \\Computer\Admin$\System32\Winevt\Logs).
- You can now choose whether to read the archive log files in the ‘Advanced Options’ window.
- Version 1.20:
- TurnedOnTimesView now scans events of computer sleep/resume and treats them like turn-off/turn-on events (The ‘Shutdown Type’ displayed for these events is ‘Sleep’).
- You can turn off this feature from the ‘Advanced Options’ window (‘Consider the sleep/resume events as turn off/on’ ).
- Version 1.15:
- TurnedOnTimesView now reads archive log files (Archive-System-*.evtx) when using the external disk mode and local computer mode. Be aware that in order to read archive log files from local computer you have to run TurnedOnTimesView as Administrator.
- Added ‘Run As Administrator’ option (Ctrl+F11).
- Version 1.12:
- TurnedOnTimesView now displays the computer name (local or remote) in the window title.
- Version 1.11:
- Fixed to display date/time properly according to daylight saving time settings.
- Version 1.10:
- Added new command-line options: /Source , /RemoteComputer , /ExternalFolder
- The settings of the ‘Advanced Options’ window are now saved to the .cfg file.
- Version 1.06:
- Added browse button in the ‘Advanced Options’ window to choose the external folder.
- Version 1.05:
- Added option to read the data from external disk (In ‘Advanced Options’ window). You should specify the location of the event log folder on the external drive ( C:\Windows\System32\winevt\Logs on Windows Vista/7/8 or C:\WINDOWS\system32\config on older systems)
- Version 1.00 — First release.
Start Using TurnedOnTimesView
If you want to get the times that a remote computer on your network was turned on, go to the Advanced Options window (F9) ,choose ‘Remote Computer’ as data source, and type the name of the remote computer to connect.
Command-Line Options
/Source | Specifies the type of data source to load. 1 = Local Computer, 2 = Remote Computer, 3 = External Disk |
/RemoteComputer | Specifies the name of the remote computer to connect (For using with /Source 2 ) Example: TurnedOnTimesView.exe /Source 2 /RemoteComputer \\comp05 |
/ExternalFolder | Specifies the external events folder to load ( For using with /Source 3) Example: TurnedOnTimesView.exe /Source 3 /ExternalFolder «K:\Windows\System32\winevt\Logs» |
/RunAsAdmin | Runs TurnedOnTimesView as administrator. |
/stext | Save the turned on times into a regular text file. |
/stab | Save the turned on times into a tab-delimited text file. |
/scomma | Save the turned on times into a comma-delimited text file (csv). |
/stabular | Save the turned on times into a tabular text file. |
/shtml | Save the turned on times into HTML file (Horizontal). |
/sverhtml | Save the turned on times into HTML file (Vertical). |
/sxml | Save the turned on times to XML file. |
/sort | This command-line option can be used with other save options for sorting by the desired column. If you don’t specify this option, the list is sorted according to the last sort that you made from the user interface. The parameter can specify the column index (0 for the first column, 1 for the second column, and so on) or the name of the column, like «Shutdown Type» and «Startup Time». You can specify the ‘ |
‘ prefix character (e.g: «
Startup Time») if you want to sort in descending order. You can put multiple /sort in the command-line if you want to sort by multiple columns.