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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] tools: Fix time offset when localtime=0

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: Fix time offset when localtime=0
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 May 2010 09:05:41 -0700
Delivery-date: Wed, 26 May 2010 09:07:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1274858131 -3600
# Node ID 15f4ead9e6861ba1180840ce99f5b7815cc3361d
# Parent  611a36481e92c6ccd36fd12c7e63a66cd1dfe07a
tools: Fix time offset when localtime=0

localtime can be stored in vm config as a string, resulting in
incorrect calculation of rtc_timeoffset.  Cast localtime to int
to ensure rtc_timeoffset is calculated properly.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxxxx>
 tools/python/xen/xend/image.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 611a36481e92 -r 15f4ead9e686 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed May 26 08:14:51 2010 +0100
+++ b/tools/python/xen/xend/image.py    Wed May 26 08:15:31 2010 +0100
@@ -129,7 +129,7 @@ class ImageHandler:
         self.dmargs = self.parseDeviceModelArgs(vmConfig)
         self.pid = None
         rtc_timeoffset = int(vmConfig['platform'].get('rtc_timeoffset', 0))
-        if vmConfig['platform'].get('localtime', 0):
+        if int(vmConfig['platform'].get('localtime', 0)):
             if time.localtime(time.time())[8]:
                 rtc_timeoffset -= time.altzone

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools: Fix time offset when localtime=0, Xen patchbot-unstable <=