Bug #39295
closedBug #39294: mgr/dashboard: Time handling
mgr/dashboard: RGW Bucket API should provide times in UTC that will be converted into local time by Angular
0%
Description
RGW -> Bucket -> details -> 'modification time' attribute will provide the local server time instead UTC time
Updated by Casey Bodley about 5 years ago
the call path for the 'GET /admin/bucket' api looks like this:
rgw_rest_bucket.cc: RGWOp_Bucket_Info::execute()
rgw_bucket.cc: RGWBucketAdminOp::info()
rgw_bucket.cc: bucket_stats()
bucket_stats() is responsible for formatting the response:
formatter->dump_stream("mtime") << ut;
which calls the stream output operator on utime_t:
inline std::ostream& operator<<(std::ostream& out, const utime_t& t)
{
return t.localtime(out);
}
utime_t also has a gmtime() method that we could call instead, ie:
ut.gmtime(formatter->dump_stream("mtime"));
i suppose our APIs should always return dates in UTC?
Updated by Casey Bodley about 5 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 27617
discussed this in the rgw standup, and consensus was to return UTC unconditionally. i made this change in https://github.com/ceph/ceph/pull/27617
Updated by Lenz Grimmer about 5 years ago
- Target version set to v15.0.0
- Backport set to nautilus
Updated by Alfonso Martínez about 5 years ago
Backend PR:
https://github.com/ceph/ceph/pull/27617
Frontend PR:
https://github.com/ceph/ceph/pull/27669
Updated by J. Eric Ivancich almost 5 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler almost 5 years ago
- Copied to Backport #39502: nautilus: mgr/dashboard: RGW Bucket API should provide times in UTC that will be converted into local time by Angular added
Updated by Nathan Cutler almost 5 years ago
- Status changed from Pending Backport to Resolved