diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-26 08:29:15 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-26 08:29:15 +0100 |
commit | 0bfde448561e1e6f723e436bd4562e3b7cd764ee (patch) | |
tree | fbcaf93847d0a45c24aec96622eca9920a22b5a0 | |
parent | 1a830511d1fd8e0a59912e2b4bbd972421cfbcd2 (diff) | |
download | xen-0bfde448561e1e6f723e436bd4562e3b7cd764ee.tar.gz xen-0bfde448561e1e6f723e436bd4562e3b7cd764ee.tar.bz2 xen-0bfde448561e1e6f723e436bd4562e3b7cd764ee.zip |
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@novell.com>
xen-unstable changeset: 21460:15f4ead9e686
xen-unstable date: Wed May 26 08:15:31 2010 +0100
-rw-r--r-- | tools/python/xen/xend/image.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index cb5f6350e6..144f4f846a 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -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: |