qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Fabianowski <bartosz@fabianowski.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Changing RTC from UTC to local time
Date: Mon, 31 May 2004 02:29:45 +0200	[thread overview]
Message-ID: <40BA7C79.1070703@fabianowski.de> (raw)
In-Reply-To: <20040530215949.GB5521@lebarbe.net>

> 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	other threads:[~2004-05-31  0:30 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-29 14:39 [Qemu-devel] Changing RTC from UTC to local time Bartosz Fabianowski
2004-05-29 17:23 ` Kyle Hayes
2004-05-29 18:50   ` Bartosz Fabianowski
2004-05-29 23:13     ` Tim
2004-05-29 23:23       ` Bartosz Fabianowski
2004-05-30  4:52         ` John R. Hogerhuis
2004-05-30 19:32           ` Bartosz Fabianowski
2004-05-30 19:42             ` Kyle Hayes
2004-05-31 13:53             ` Pavel Janík
2004-05-31 14:20               ` Bartosz Fabianowski
2004-05-31 14:51               ` Fabrice Bellard
2004-05-31 14:51                 ` Bartosz Fabianowski
2004-05-31 15:12                 ` Derek Fawcus
2004-05-31 16:43                   ` Tim
2004-05-31 16:27                 ` Pavel Janík
2004-05-31 17:09                 ` Kyle Hayes
2004-05-30 21:59     ` Flavien
2004-05-31  0:29       ` Bartosz Fabianowski [this message]
2004-05-31  1:52         ` Kyle Hayes
2004-05-31 12:11           ` Bartosz Fabianowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40BA7C79.1070703@fabianowski.de \
    --to=bartosz@fabianowski.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).