]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't convert object mtime to UTC
authorYehuda Sadeh <yehuda@inktank.com>
Wed, 7 Nov 2012 21:21:15 +0000 (13:21 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 15 Nov 2012 17:22:24 +0000 (09:22 -0800)
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>
src/rgw/rgw_rados.cc

index a77d0aca71a5610f5d7dd8d9523466e3e59004b2..08c28fba4c8fa36ca195e03e72ab1c5ece2a60b6 100644 (file)
@@ -1779,14 +1779,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;