]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rbd: fix delay time calculation for trash move
authorMykola Golub <mgolub@suse.com>
Thu, 10 Jan 2019 15:15:36 +0000 (15:15 +0000)
committerMykola Golub <mgolub@suse.com>
Thu, 10 Jan 2019 15:15:36 +0000 (15:15 +0000)
Fixes: https://tracker.ceph.com/issues/37861
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/tools/rbd/action/Trash.cc

index c2b9f98692ff812c9ef03fc92b4c9c3d770260b4..783978074b696960486cd8058331270ca3a166e3 100644 (file)
@@ -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;