WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] what does localtime=1 actually do?

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] what does localtime=1 actually do?
From: Philipp Hahn <hahn@xxxxxxxxxxxxx>
Date: Tue, 9 Nov 2010 08:26:38 +0100
Delivery-date: Mon, 08 Nov 2010 23:28:22 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101108165328.GA12001@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Organization: Univention.de
References: <20101108092620.GA1915@xxxxxxxxxxxxxxxxxx> <AEC6C66638C05B468B556EA548C1A77D01B20574@trantor> <20101108165328.GA12001@xxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.10 (enterprise35 20100903.1171286)
Hello,

Am Montag 08 November 2010 17:53:28 schrieb Mark Adams:
> > > 2008 R2 domU. The dom0 was rebooted, and when it came up the domU was
> > > 1 hour behind the time of dom0. It had to be changed in windows to the
> > > correct time.
...
> > Have you started daylight savings in the last few days? I've seen this
> > before and my theory is that when the domain is created, xend figures
> > out what the offset is from UTC and remembers it. If the DomU is
> > rebooted it uses the same offset which means if it was created before
> > DST started and then rebooted after, the offset will be wrong.
...
> Yes, we've just come off daylight savings so this is likely the issue. A
> bug that should be looked into maybe?

Talk to Microsoft to allow Windows to use a RTC running in UTC?

The problem (as far as I understand it) is the following: Most UNIXes use a 
real-time-clock (RTC) running in UTC. The time-zone you configured is used  
to convert from UTC to local time each time to you ask your computer for the 
local time, so its 'trivial' to correctly implement daylight saving: Your 
time-zone data contains a database which tells the C-library to add/substrace 
N+x hours in summer and N hours in winter.
For most countries the dates for daylight-switching and the number of hours x 
are mostly fixed, but in some other countries they change from year to year; 
that's why on Linux you often get updates to the timezone-database.

Windows on the other hand assumes the RTC is running in local time. To 
correctly switch to and from daylight-saving, Windows needs to store the time 
of last-shutdown and a flag which indicates, if the daylight-saving is on or 
off. Each time Windows boots it checks the date and flag to see, if the 
daylight-saving-switch-time has happended. If yes, if reads the RTC, adds or 
subtracts the daylight-saving-delta-time, stores the time back to RTC and 
record that is has done the switch.

Now what probably happend in your case: Your Linux switched from summer to 
winter and exported the already corrected local time to Windows  Windows than 
detected the change from its internal flags as well and subtractes one 
additional hour to fix its view of the RTC from summer to winter.

To fix the problem, you either can tell Xen to not export the local time to 
Windows, but a time UTC±x, where x can be cahnged by Windows and is remebered 
by Xen on shutdown. That way Windows can do its voodoo itself and Xen just 
exports a fixed-offset-RTC to Windows.
Or you can try to switch Windows to UTC by searhcing for
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001

Sincerely
Philipp Hahn
-- 
Philipp Hahn           Open Source Software Engineer      hahn@xxxxxxxxxxxxx   
Univention GmbH        Linux for Your Business        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  28359 Bremen                   fax: +49 421 22 232-99
                                                    http://www.univention.de

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>