]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: move check_date place
authorZhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Wed, 25 Jul 2018 04:36:40 +0000 (12:36 +0800)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 4 Jan 2019 03:00:23 +0000 (19:00 -0800)
Signed-off-by: Zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
src/rgw/rgw_lc_s3.cc

index 0b9ed0da95b5bee98f9d6df5df56c3c68bb0ad16..c78851a359f5131af02ba4e4871042b68ea755b9 100644 (file)
 
 #define dout_subsys ceph_subsys_rgw
 
+static bool check_date(const string& _date)
+{
+  boost::optional<ceph::real_time> date = ceph::from_iso_8601(_date);
+  if (boost::none == date) {
+    return false;
+  }
+  struct timespec time = ceph::real_clock::to_timespec(*date);
+  if (time.tv_sec % (24*60*60) || time.tv_nsec) {
+    return false;
+  }
+  return true;
+}
 
 bool LCExpiration_S3::xml_end(const char * el) {
   LCDays_S3 *lc_days = static_cast<LCDays_S3 *>(find_first("Days"));
@@ -358,15 +370,4 @@ XMLObj *RGWLCXMLParser_S3::alloc_obj(const char *el)
   return obj;
 }
 
-static bool check_date(const string& _date)
-{
-  boost::optional<ceph::real_time> date = ceph::from_iso_8601(_date);
-  if (boost::none == date) {
-    return false;
-  }
-  struct timespec time = ceph::real_clock::to_timespec(*date);
-  if (time.tv_sec % (24*60*60) || time.tv_nsec) {
-    return false;
-  }
-  return true;
-}
+