]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: bucket stats report mtime in UTC
authorCasey Bodley <cbodley@redhat.com>
Tue, 16 Apr 2019 17:10:42 +0000 (13:10 -0400)
committerAshish Singh <assingh@redhat.com>
Wed, 15 May 2019 13:52:41 +0000 (19:22 +0530)
Fixes: https://tracker.ceph.com/issues/39295
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit fd15ab096cbb605df256c9ec7d2078fc534267a4)

src/rgw/rgw_bucket.cc

index 679dde48363e0f5d1dc9c4afd2ca812bc579442a..308a93ce04c0ff3ee3468de400a8b7cfdd24c512 100644 (file)
@@ -1452,7 +1452,7 @@ static int bucket_stats(RGWRados *store, const std::string& tenant_name, std::st
   ::encode_json("owner", bucket_info.owner, formatter);
   formatter->dump_string("ver", bucket_ver);
   formatter->dump_string("master_ver", master_ver);
-  formatter->dump_stream("mtime") << ut;
+  ut.gmtime(formatter->dump_stream("mtime"));
   formatter->dump_string("max_marker", max_marker);
   dump_bucket_usage(stats, formatter);
   encode_json("bucket_quota", bucket_info.quota, formatter);