Project

General

Profile

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

Added by Stephan Müller 6 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
dashboard/usability
Target version:
Start date:
04/15/2019
Due date:
% Done:

0%

Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

RGW -> Bucket -> details -> 'modification time' attribute will provide the local server time instead UTC time


Related issues

Copied to mgr - Backport #39502: nautilus: mgr/dashboard: RGW Bucket API should provide times in UTC that will be converted into local time by Angular Resolved

History

#1 Updated by Alfonso MH 6 months ago

  • Assignee set to Alfonso MH

#2 Updated by Casey Bodley 6 months 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 6 months ago

  • Status changed from New to Need 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 6 months ago

  • Target version set to v15.0.0
  • Backport set to nautilus

#6 Updated by Eric Ivancich 6 months ago

  • Status changed from Need Review to Pending Backport

#7 Updated by Nathan Cutler 6 months 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 5 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF