nerdexam
Linux_Foundation

LFCS · Question #566

On a dual boot system, every time the system is booted back into Linux the time has been set backward by two hours. Which of the following commands will correct the problem so it will not occur again?

The correct answer is C. hwclock --hctosys --localtime. To correct a persistent time discrepancy in a dual-boot Linux system where the time is set backward, the hwclock --hctosys --localtime command should be used.

Submitted by deeparc· Apr 18, 2026Essential Commands

Question

On a dual boot system, every time the system is booted back into Linux the time has been set backward by two hours. Which of the following commands will correct the problem so it will not occur again?

Options

  • Antpdate pool.ntp.org
  • Bdate -d 'two hours'
  • Chwclock --hctosys --localtime
  • Dtime hwclock

How the community answered

(44 responses)
  • A
    2% (1)
  • B
    5% (2)
  • C
    84% (37)
  • D
    9% (4)

Why each option

To correct a persistent time discrepancy in a dual-boot Linux system where the time is set backward, the `hwclock --hctosys --localtime` command should be used.

Antpdate pool.ntp.org

`ntpdate pool.ntp.org` synchronizes the system time with an NTP server once, but it does not change how Linux interprets the hardware clock for subsequent boots.

Bdate -d 'two hours'

`date -d 'two hours'` would display the date two hours from now, or with appropriate syntax, adjust the system time temporarily, but this does not address the underlying hardware clock interpretation issue for future boots.

Chwclock --hctosys --localtimeCorrect

The `hwclock --hctosys --localtime` command instructs the Linux system to set its system time from the hardware clock (RTC) and to interpret the hardware clock's time as local time, rather than UTC. This is essential for dual-boot systems because Windows typically keeps the hardware clock set to local time, while Linux distributions often default to UTC, causing time inconsistencies when switching operating systems.

Dtime hwclock

`time hwclock` measures the execution time of the `hwclock` command itself and does not modify any time settings or system configurations.

Concept tested: Hardware clock synchronization in dual-boot systems

Source: https://manpages.debian.org/testing/util-linux/hwclock.8.en.html

Topics

#Hardware Clock#System Time#Time Configuration#hwclock command

Community Discussion

No community discussion yet for this question.

Full LFCS Practice