From 947351e62644bc64f8215ee2ce47ff0264c732b1 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Thu, 10 Jan 2019 15:15:36 +0000 Subject: [PATCH] rbd: fix delay time calculation for trash move Fixes: https://tracker.ceph.com/issues/37861 Signed-off-by: Mykola Golub --- src/tools/rbd/action/Trash.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rbd/action/Trash.cc b/src/tools/rbd/action/Trash.cc index c2b9f98692f..783978074b6 100644 --- a/src/tools/rbd/action/Trash.cc +++ b/src/tools/rbd/action/Trash.cc @@ -86,7 +86,7 @@ int execute_move(const po::variables_map &vm, } } - time_t dt = exp_time.sec() - now.sec(); + time_t dt = (exp_time - now).sec(); if(dt < 0) { std::cerr << "rbd: cannot use a date in the past as an expiration date" << std::endl; -- 2.39.5