From 48b8ba4ad26039172d355d33e6065584a6a744c2 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Mon, 9 Dec 2013 16:57:11 -0600 Subject: [PATCH] Create a DateTime object from the timestamp Signed-off-by: Zack Cerza --- teuthology/queue.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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