Merge pull request #31887 from ofriedma/wip-ofriedma-lc-hdr-mid

rgw: LC expiration header should present midnight expiration date

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
This commit is contained in:
Casey Bodley 2020-01-27 10:48:11 -05:00 committed by GitHub
commit e0743af281
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1656,7 +1656,7 @@ std::string s3_expiration_header(
if (rule_expiration.has_days()) {
rule_expiration_date =
boost::optional<ceph::real_time>(
mtime + make_timespan(rule_expiration.get_days()*24*60*60));
mtime + make_timespan(rule_expiration.get_days()*24*60*60 - ceph::real_clock::to_time_t(mtime)%(24*60*60) + 24*60*60));
}
}