mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Make date time handling slightly more permissive
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
1 parent
6492f2ffbf
commit
b586bb55ad
1 file changed
+4
-2
@@ -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:
|
||||
|
||||