Project

General

Profile

Bug #14862

utime.h: fix timezone issue in round_to_* funcs.

Added by Chao Zhao about 1 year ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
02/25/2016
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Needs Doc:
No

Description

gmtime_r converts local time to UTC, however mktime only takes an argument as local time. Use localtime_r instead of gmtime_r will fix.

round_to_hour may be called by recalc_round_timestamp(ts) in rgw/rgw_log.cc:UsageLogger.

When system timezone setting is not UTC, the rgw_usage_log_entry will set wrong timestamp and epoch.


Related issues

Duplicated by Bug #17200: utime.h: fix timezone issue in round_to_* funcs. Duplicate 09/02/2016
Copied to Backport #17583: jewel: utime.h: fix timezone issue in round_to_* funcs. Resolved

Associated revisions

Revision c914f28d (diff)
Added by Chao Zhao about 1 year ago

utime.h: fix timezone issue in round_to_* funcs.

gmtime_r converts local time to UTC, however mktime only takes an
argument as local time. Use localtime_r instead of gmtime_r will fix.

Fixes: #14862

Reported-by: isyippee <>
Signed-off-by: Zhao Chao <>

Revision 4f8287f9 (diff)
Added by Chao Zhao 6 months ago

utime.h: fix timezone issue in round_to_* funcs.

gmtime_r converts local time to UTC, however mktime only takes an
argument as local time. Use localtime_r instead of gmtime_r will fix.

Fixes: #14862

Reported-by: isyippee <>
Signed-off-by: Zhao Chao <>
(cherry picked from commit c914f28d6e79726b84261884c37b89d7c6b34f21)

History

#2 Updated by Nathan Cutler about 1 year ago

  • Status changed from New to Need Review

#3 Updated by Nathan Cutler about 1 year ago

  • Status changed from Need Review to Resolved

#4 Updated by Nathan Cutler 7 months ago

  • Status changed from Resolved to Pending Backport
  • Backport set to jewel
  • Needs Doc set to No

#5 Updated by Nathan Cutler 7 months ago

  • Duplicated by Bug #17200: utime.h: fix timezone issue in round_to_* funcs. added

#6 Updated by Nathan Cutler 7 months ago

  • Copied to Backport #17583: jewel: utime.h: fix timezone issue in round_to_* funcs. added

#7 Updated by Nathan Cutler 4 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF