windows时区不同步问题资料收集

上一篇 / 下一篇  2011-07-11 22:04:26 / 个人分类:xen



[xen-4.0-testing] tools: Fix time offset whenlocaltime=0Remove Highlighting

# HG changeset patch
# User Keir Fraser <keir.fraser [at] citrix>
# Date 1274858955 -3600
# Node ID e9110e15235c422949ca8f255085adef57f3c798
# Parent 72b9c78aef6bcdead03c3c36dd1bc324383ed01c
tools: Fix time offset whenlocaltime=0

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

Signed-off-by: Jim Fehlig <jfehlig [at] novell>
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:


TAG:

werm520的个人空间 引用 删除 werm520   /   2011-07-11 22:41:05
rtc_timeoffset
rtc_offset
 

评分:0

我来说两句

日历

« 2024-03-29  
     12
3456789
10111213141516
17181920212223
24252627282930
31      

数据统计

  • 访问量: 38352
  • 日志数: 46
  • 建立时间: 2010-07-13
  • 更新时间: 2019-03-21

RSS订阅

Open Toolbar