From: zhangshaowen Date: Thu, 7 May 2020 11:18:14 +0000 (+0800) Subject: rgw: abort multipart date should be round up to midnight next day like expiration one X-Git-Tag: v15.2.5~49^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b9eb8b0e046bd1e23cd3fd3b7d3b87c99eeb5d13;p=ceph.git rgw: abort multipart date should be round up to midnight next day like expiration one Signed-off-by: zhangshaowen (cherry picked from commit c314d322f8a0fc628f9d19b69491b54a82c069f0) --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index c6a0dd70c5ce..d427f1636619 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1999,7 +1999,7 @@ bool s3_multipart_abort_header( std::optional rule_abort_date; if (mp_expiration.has_days()) { rule_abort_date = std::optional( - mtime + make_timespan(mp_expiration.get_days()*24*60*60)); + mtime + make_timespan(mp_expiration.get_days()*24*60*60 - ceph::real_clock::to_time_t(mtime)%(24*60*60) + 24*60*60)); } // update earliest abort date