summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2012-11-07 13:21:15 -0800
committerYehuda Sadeh <yehuda@inktank.com>2012-11-15 09:22:24 -0800
commitcd18b9f43cce68ac3d8f109e82a5b603f9caad9b (patch)
treefa3ae21c66bdc44ab520443d6b7fc1be16a19f1a /src
parentddb40dec6e8d930fd63a71ef1c98279d6472e3e4 (diff)
downloadceph-cd18b9f43cce68ac3d8f109e82a5b603f9caad9b.tar.gz
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 <yehuda@inktank.com>
Diffstat (limited to 'src')
-rw-r--r--src/rgw/rgw_rados.cc9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index a77d0aca71a..08c28fba4c8 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -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;