Project

General

Profile

Actions

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.

Status:
Resolved
Priority:
Normal
Category:
UX
Target version:
% Done:

0%

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

Description

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


Related issues 1 (0 open1 closed)

Copied to Dashboard - Backport #39502: nautilus: mgr/dashboard: RGW Bucket API should provide times in UTC that will be converted into local time by AngularResolvedAshish SinghActions
Actions #1

Updated by Alfonso Martínez about 5 years ago

  • Assignee set to Alfonso Martínez
Actions #2

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?

Actions #3

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

Actions #4

Updated by Lenz Grimmer about 5 years ago

  • Target version set to v15.0.0
  • Backport set to nautilus
Actions #6

Updated by J. Eric Ivancich almost 5 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #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
Actions #8

Updated by Nathan Cutler almost 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF