Time changes by one hour while rebooting RHEL8 Linux server

I have a Linux server running on RHEL8 and chrony is used for time synchronization. While rebooting the server, in the message files I see below time difference:

Dec 22 10:09:53 prodserver1 systemd[1]: Shutting down.
Dec 22 10:09:53 prodserver1 kernel: printk: systemd-shutdow: 59 output lines suppressed due to ratelimiting
Dec 22 10:09:53 prodserver1 systemd-shutdown[1]: Syncing filesystems and block devices.
Dec 22 **10:09:53** prodserver1 systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Dec 22 **10:09:53** prodserver1 systemd-journald[7001]: Journal stopped
Dec 22 **11:10:04** prodserver1 kernel: Linux version 4.18.0-240.1.1.el8_3.x86_64 ([email protected]) (gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)) #1 SMP Fri Oct 16 13:36:46 EDT 2020
Dec 22 **11:10:04** prodserver1 kernel: Command line: BOOT_IMAGE=(hd0,gpt2)/vmlinuz-4.18.0-240.1.1.el8_3.x86_64 root=/dev/mapper/systemvg-rootlv ro crashkernel=auto resume=/dev/mapper/systemvg-swaplv rd.lvm.lv=systemvg/rootlv rd.lvm.lv=systemvg/swaplv rd.lvm.lv=systemvg/usrlv net.ifnames=0 rhgb quiet ipv6.disable=1 audit=1 audit_backlog_limit=128
Dec 22 11:10:04 prodserver1 kernel: Disabled fast string operations
Dec 22 11:10:04 prodserver1 kernel: x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
Dec 22 11:10:04 prodserver1 kernel: x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
Dec 22 11:10:04 prodserver1 kernel: x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'

Once the server is up, time is again corrected.

Dec 22 11:10:08 prodserver1 systemd[1]: Started Setup Virtual Console.
Dec 22 11:10:08 prodserver1 systemd[1]: Reached target Switch Root.
Dec 22 11:10:08 prodserver1 systemd[1]: Starting Switch Root...
Dec 22 11:10:08 prodserver1 systemd[1]: Switching root.
Dec 22 11:10:08 prodserver1 systemd-journald[290]: Journal stopped
Dec 22 10:10:10 prodserver1 systemd-journald[290]: Received SIGTERM from PID 1 (systemd).
Dec 22 10:10:10 prodserver1 kernel: printk: systemd: 23 output lines suppressed due to ratelimiting
Dec 22 10:10:10 prodserver1 kernel: SELinux:  policy capability network_peer_controls=1
Dec 22 10:10:10 prodserver1 kernel: SELinux:  policy capability open_perms=1
Dec 22 10:10:10 prodserver1 kernel: SELinux:  policy capability extended_socket_class=1
Dec 22 10:10:10 prodserver1 kernel: SELinux:  policy capability always_check_network=0

Solution 1:

The wrong times seem to happen whenever the system is running on initramfs.

You may have recently changed the system timezone, but haven't refreshed the initramfs file after that. As a result, the /etc/localtime file within initramfs is now out of sync with the corresponding file in the real root filesystem.

To rebuild your initramfs for your current kernel, run:

cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak
dracut -f /boot/initramfs-$(uname -r).img $(uname -r)