From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BU7Yg-0006Nt-Iz for qemu-devel@nongnu.org; Sat, 29 May 2004 13:23:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BU7Ye-0006N7-Mx for qemu-devel@nongnu.org; Sat, 29 May 2004 13:23:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BU7Ye-0006Mj-KQ for qemu-devel@nongnu.org; Sat, 29 May 2004 13:23:44 -0400 Received: from [24.21.209.245] (helo=pdx.silverbeach.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BU7YD-0007yM-9g for qemu-devel@nongnu.org; Sat, 29 May 2004 13:23:17 -0400 Received: from localhost (localhost [127.0.0.1]) by pdx.silverbeach.net (Postfix) with ESMTP id 868FA1BF491 for ; Sat, 29 May 2004 10:23:19 -0700 (PDT) From: Kyle Hayes Subject: Re: [Qemu-devel] Changing RTC from UTC to local time Date: Sat, 29 May 2004 10:23:18 -0700 References: <40B8A0B1.3040601@fabianowski.de> In-Reply-To: <40B8A0B1.3040601@fabianowski.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200405291023.18228.kyle@silverbeach.net> Reply-To: kyle@silverbeach.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Saturday 29 May 2004 07:39, Bartosz Fabianowski wrote: > Hi > > I have recently been experimenting with QEMU a bit and I noticed > that the simulated RTC will always give the time in UTC, not in the > local time zone of the host. This is probably by design; however, I > would like to question that design choice. > > On a PC, the RTC is supposed to always be set to local time, not to > UTC. It might be different on different architectures - but for a > simulated PC, the current behavior is not correct. Er, no. For a _Windows_ PC, this is true. For all *BSD and Linux OSes, you should usually use UTC/GMT for the hardware clock. > This is an important issue because Windows assumes that the RTC > behaves to the spec and thinks that the time reported by the RTC is > local. Thus, a Windows installed inside QEMU will report the > current UTC time as the local time. If the host computer is located > in any time zone other than GMT, the time on the host and the time > on the slave will therefore be off by hours. > > The fix for this is obvious - set the RTC to the local time of the > host, not to UTC. I have attached a trivial patch to accomplish > this. Please revert the patch or make it so that it is a runtime option. I don't run Windows in QEMU and this makes all my times off. Best, Kyle