by Dave Marshall (CoreLite)
Editor’s Note: Wiki Pick is a new monthly column highlighting one article from the PCLinuxOS Knowlegebase Wiki every month. Whenever possible (and when known), we’ll attribute the Wiki Pick article to the PCLinuxOS user who made the Wiki post. The Wiki cannot survive and thrive without the efforts of PCLinuxOS members contributing and keeping it updated. So, visit and contribute to YOUR PCLinuxOS Knowlegebase Wiki!
This works for any version of PCLinuxOS (and most other non-systemd Linux distros) when dual booting Windows 10 or 11.

Image by Gerd Altmann from Pixabay
After installing Linux to dual boot with Windows, the wrong time appears on the Taskbar when you boot back in to Windows. Linux and Windows both get the time from the same source. The computer has two primary clocks – the hardware clock and the system clock. The system clock is what you see on the taskbar. The hardware clock is the motherboard clock that you set up in the UEFI/BIOS. When you boot the computer up, the system clock reads the time from the hardware clock and keeps time until the computer is shut down. When the computer shuts down, the system clock writes the time to the hardware clock.
The problem is caused by the different way that the two operating systems calculate the time based on that reading from the hardware clock. Windows sees the time from the hardware clock as Local Time, which is the time that you set in the BIOS. Linux sees the hardware clock time as UTC (Universal Time), and then calculates the local time from the Time Zone that you selected during the installation. In my case, the local time is UTC minus 5 hours. If my hardware clock shows 12:00 noon, Linux thinks that is UTC and calculates local time. At shut down, Linux syncs the hardware clock to UTC, or 5:00 PM. When you shut down Linux and boot into Windows, Windows sees the hardware clock showing 5:00 PM and thinks that is local time, when in fact, it is 5 hours ahead.
There are a few different ways to fix this problem. Fixing it in Windows requires a Registry hack. We won’t go there. One way to fix it in Linux involves changing /etc/adjtime with a text editor. The easy way to fix it is a simple one line command in Konsole.
Log in to Linux as root and enter this command: hwclock -w -l
That has the same effect as editing /etc/adjtime.
You will not see a change on your Linux desktop, but the next time you boot into Windows, you will see the correct time on the taskbar.
You can view the original PCLinuxOS Knowledgebase Wiki article here.
|