Fixes: #3452
When we read object info, don't try to convert mtime to
UTC, it's already in UTC.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
/* Convert all times go GMT to make them compatible */
if (mod_ptr || unmod_ptr) {
- struct tm mtm;
- struct tm *gmtm = gmtime_r(&astate->mtime, &mtm);
- if (!gmtm) {
- ldout(cct, 0) << "NOTICE: could not get translate mtime for object" << dendl;
- r = -EINVAL;
- goto done_err;
- }
- ctime = mktime(gmtm);
+ ctime = astate->mtime;
if (mod_ptr) {
ldout(cct, 10) << "If-Modified-Since: " << *mod_ptr << " Last-Modified: " << ctime << dendl;