From cc06090f0bb0d61b7b76f1ec5573f48580874d99 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 7 Nov 2012 13:21:15 -0800 Subject: [PATCH] rgw: don't convert object mtime to UTC 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 --- src/rgw/rgw_rados.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index b468b6f042f59..ac2759e64612f 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2224,14 +2224,7 @@ int RGWRados::prepare_get_obj(void *ctx, rgw_obj& obj, /* 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; -- 2.39.5