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-unstable] Make date time handling slightly more per

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Make date time handling slightly more permissive
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Apr 2007 14:00:49 -0700
Delivery-date: Tue, 10 Apr 2007 14:01:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Tom Wilkie <tom.wilkie@xxxxxxxxx>
# Date 1176220900 -3600
# Node ID 28efbe0ea4901511171e06ec44b1d1023186220c
# Parent  4add9eb83f7fc8590b4a698a272d3a7b4665734c
Make date time handling slightly more permissive

signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xm/main.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r 4add9eb83f7f -r 28efbe0ea490 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Mon Apr 09 17:09:21 2007 +0100
+++ b/tools/python/xen/xm/main.py       Tue Apr 10 17:01:40 2007 +0100
@@ -732,8 +732,10 @@ def xm_restore(args):
 
 
 def datetime_to_secs(v):
-    return time.mktime(time.strptime(str(v) + 'UTC', '%Y%m%dT%H:%M:%S%Z'))
-
+    unwanted = ":-."
+    for c in unwanted:
+        v = str(v).replace(c, "")
+    return time.mktime(time.strptime(v[0:14], '%Y%m%dT%H%M%S'))
 
 def getDomains(domain_names, state, full = 0):
     if serverType == SERVER_XEN_API:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Make date time handling slightly more permissive, Xen patchbot-unstable <=