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: wip-pdonnell-testing-20200918.022351~660^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c314d322f8a0fc628f9d19b69491b54a82c069f0;p=ceph-ci.git rgw: abort multipart date should be round up to midnight next day like expiration one Signed-off-by: zhangshaowen --- diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index 53b7ef45432..443a7929da0 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -1735,7 +1735,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