Bug #39295
closed
Bug #39294: mgr/dashboard: Time handling
mgr/dashboard: RGW Bucket API should provide times in UTC that will be converted into local time by Angular
Added by Stephan Müller about 5 years ago.
Updated about 3 years ago.
Description
RGW -> Bucket -> details -> 'modification time' attribute will provide the local server time instead UTC time
- Assignee set to Alfonso Martínez
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?
- Status changed from New to Fix Under Review
- Pull request ID set to 27617
- Target version set to v15.0.0
- Backport set to nautilus
- Status changed from Fix Under Review to Pending Backport
- 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
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF