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-changelog

[Xen-changelog] [xen-4.0-testing] tools: Fix time offset when localtime=

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] tools: Fix time offset when localtime=0
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Jun 2010 02:45:23 -0700
Delivery-date: Wed, 02 Jun 2010 02:46:47 -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 1274858955 -3600
# Node ID e9110e15235c422949ca8f255085adef57f3c798
# Parent  72b9c78aef6bcdead03c3c36dd1bc324383ed01c
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>
xen-unstable changeset:   21460:15f4ead9e686
xen-unstable date:        Wed May 26 08:15:31 2010 +0100
---
 tools/python/xen/xend/image.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 72b9c78aef6b -r e9110e15235c tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed May 26 08:28:56 2010 +0100
+++ b/tools/python/xen/xend/image.py    Wed May 26 08:29:15 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
             else:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

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