qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Changing RTC from UTC to local time


From: Bartosz Fabianowski
Subject: Re: [Qemu-devel] Changing RTC from UTC to local time
Date: Mon, 31 May 2004 02:29:45 +0200
User-agent: Mozilla Thunderbird 0.6 (X11/20040517)

There is a problem with setting RTC to local time  with  daylight
savings, when running multiple OSs on the same hardware.

Actually, it's not quite as bad.

First of all, the problem you described affects all multi boot systems. If more than one operating system decides to adjust for DST, yes, you get a clock that is off. That is a know problem and users of multi boot systems, which are quite common these days, have learned to deal with it. When you are installing Windows, it suggests you let it adjust for DST automatically. However, you can uncheck the relevant check box and Windows will leave your RTC alone. So, you can designate one operating system to take care of the DST adjustment or you can even do it manually if you want to. Again, this is not a new issue uncovered here; it affects all multi boot systems.

With QEMU, the situation is actually much better. When you shut down QEMU, its RTC state is not saved anywhere and it gets initialized from the host's RTC the next time QEMU is run. And also, while it is running, QEMU keeps synchronizing its RTC with the host time. So if you run multiple OSes inside QEMU and if you allow any of them to adjust for DST, this will actually have no effect. Therefore, I don't see a problem with allowing the RTC to be running in local time and to allow the operating systems to play with it.

Conclusion : setting RTC to local time is a _broken_ concept.

I agree that the world would be a better - and much simpler - place if all RTCs ran in UTC. However, this is simply not the case. PC RTCs have historically always run in local time. While some PC servers may be handling this differently these days, it is certainly still true of desktops. And if I understand the idea behind QEMU right, it is to emulate a PC and behave like a real one would. So to follow the vast majority of PCs out there, QEMU should have a local time RTC by default.

And after all, with my patch, you would still have the option of using an UTC RTC if you choose so.

- Bartosz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]