mirror of
https://github.com/ceph/ceph
synced 2025-02-23 11:07:35 +00:00
Replaced gmtime with gmtime_r.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
This commit is contained in:
parent
ae06f55fe9
commit
68c1e7c1a4
@ -86,8 +86,10 @@ int RGWRole::create(bool exclusive)
|
||||
real_clock::to_timeval(t, tv);
|
||||
|
||||
char buf[30];
|
||||
strftime(buf,30,"%Y-%m-%dT%H:%M:%S", std::gmtime(&tv.tv_sec));
|
||||
sprintf(buf + strlen(buf),".%dZ",(int)tv.tv_usec);
|
||||
struct tm result;
|
||||
gmtime_r(&tv.tv_sec, &result);
|
||||
strftime(buf,30,"%Y-%m-%dT%H:%M:%S", &result);
|
||||
sprintf(buf + strlen(buf),".%dZ",(int)tv.tv_usec/1000);
|
||||
creation_date.assign(buf, strlen(buf));
|
||||
|
||||
auto& pool = store->get_zone_params().roles_pool;
|
||||
|
Loading…
Reference in New Issue
Block a user