Bug #39295
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
0%
Description
RGW -> Bucket -> details -> 'modification time' attribute will provide the local server time instead UTC time
Related issues
History
#1 Updated by Alfonso Martínez almost 5 years ago
- Assignee set to Alfonso Martínez
#2 Updated by Casey Bodley almost 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?
#3 Updated by Casey Bodley almost 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
#4 Updated by Lenz Grimmer almost 5 years ago
- Target version set to v15.0.0
- Backport set to nautilus
#5 Updated by Alfonso Martínez almost 5 years ago
Backend PR:
https://github.com/ceph/ceph/pull/27617
Frontend PR:
https://github.com/ceph/ceph/pull/27669
#6 Updated by J. Eric Ivancich almost 5 years ago
- Status changed from Fix Under Review to Pending Backport
#7 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
#8 Updated by Nathan Cutler almost 5 years ago
- Status changed from Pending Backport to Resolved