From 499c0e95a58bb7bd2326ea74761ea98449d26d3b Mon Sep 17 00:00:00 2001 From: weiqiaomiao Date: Mon, 4 Jul 2016 18:16:39 +0800 Subject: [PATCH] rgw: for the create_bucket api, if the input creation_time is zero, we should set it to 'now" Fixes: http://tracker.ceph.com/issues/16597 Signed-off-by: weiqiaomiao --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 8d3a5078e0958..dffaf34491f36 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -5158,7 +5158,7 @@ int RGWRados::create_bucket(RGWUserInfo& owner, rgw_bucket& bucket, info.bucket_index_shard_hash_type = RGWBucketInfo::MOD; info.requester_pays = false; if (real_clock::is_zero(creation_time)) { - creation_time = ceph::real_clock::now(cct); + info.creation_time = ceph::real_clock::now(cct); } else { info.creation_time = creation_time; } -- 2.39.5