Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: set RTC to localtime only for Windows/ReactOS/DOS and UTC for all others #1429

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

chasecovello
Copy link
Contributor

Description

Windows/ReactOS/DOS conventionally set the system RTC to local time, but Linux/UNIX/macOS use UTC. Guest systems that expect UTC and have the time zone set to local time will have the wrong system clock time at startup until they set the clock with NTP. This is especially an issue for disk images imported from or shared with another VM configuration that uses UTC for non-Windows guests.

Further, according to the QEMU man page:

Enable driftfix (i386 targets only) if you experience time drift problems, specifically with Windows' ACPI HAL. This option will try to figure out how many timer interrupts were not processed by the Windows guest and will re-inject them.

This option thus seems unnecessary for other systems and may cause performance or timekeeping issues, so enable only for Windows/ReactOS/DOS.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have performed a self-review of my code
  • I have tested my code in common scenarios and confirmed there are no regressions

…er OS

Windows/ReactOS/DOS conventionally set the system RTC to local time, but Linux/UNIX/macOS use UTC. Guest systems that expect UTC and have the time zone set to local time will have the wrong system clock time at startup until they set the clock with NTP. This is especially an issue for disk images imported from or shared with another VM configuration that uses UTC for non-Windows guests.
According to the QEMU man page:

    Enable driftfix (i386 targets only) if you experience time
    drift problems, specifically with Windows' ACPI HAL. This
    option will try to figure out how many timer interrupts were
    not processed by the Windows guest and will re-inject them.

This option thus seems unnecessary for other systems and may cause
performance or timekeeping issues, so enable only for
Windows/ReactOS/DOS.
@chasecovello chasecovello changed the title Set RTC to localtime only for Windows/ReactOS/DOS and UTC for all others Fix: set RTC to localtime only for Windows/ReactOS/DOS and UTC for all others Aug 20, 2024
@flexiondotorg flexiondotorg merged commit 070514d into quickemu-project:master Aug 27, 2024
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants