From: Zack Cerza Date: Mon, 9 Dec 2013 22:57:11 +0000 (-0600) Subject: Create a DateTime object from the timestamp X-Git-Tag: v0.94.10~27^2^2~364^2~462 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=48b8ba4ad26039172d355d33e6065584a6a744c2;p=ceph.git Create a DateTime object from the timestamp Signed-off-by: Zack Cerza --- diff --git a/teuthology/queue.py b/teuthology/queue.py index c913aca517d..287a6798b29 100644 --- a/teuthology/queue.py +++ b/teuthology/queue.py @@ -24,7 +24,8 @@ restart_file_path = '/tmp/teuthology-restart-workers' def need_restart(): if not os.path.exists(restart_file_path): return False - if os.path.getmtime(restart_file_path) > start_time: + file_mtime = datetime.utcfromtimestamp(os.path.getmtime(restart_file_path)) + if file_mtime > start_time: return True else: return False